Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

mygit-lite

Build Status License Version

mygit-lite — a simplified Git clone written in JavaScript.

This project implements the core internals of Git (blobs, trees, commits, refs) in pure Node.js as an educational tool.

Features

  • Init: Create repositories (.mygit folder structure)
  • Add: Hash files (SHA-1) to blob storage
  • Commit: Create snapshots with author/message
  • Log: View linear commit history
  • Checkout: Switch commits/branches (restore working tree)
  • Branch: Create, list, and delete branches
  • Diff: View file modifications (index vs working tree)

Installation

npm install -g mygit-lite

Quick Start

# Initialize
mygit init

# Add files
echo "hello" > README.md
mygit add README.md

# Commit
mygit commit -m "Initial commit"

# View History
mygit log

Architecture

See docs/ARCHITECTURE.md for details on the internal data model.

Folder Structure

mygit-lite/
 ├── bin/          # CLI entry point
 ├── lib/          # Core logic (Repo, Storage, Indexer)
 ├── commands/     # Command implementations
 ├── tests/        # Integration and Unit tests
 └── docs/         # Architecture documentation

Development

Run tests:

npm test

Run local instance:

node bin/mygit.js status

Planned Features

  • Merge support
  • Remote remotes (push/pull)
  • Packfiles
  • ".mygitignore" support

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages