This is a solution for "Build Your Own Git" Challenge.
In this challenge, you'll build a small Git implementation that's capable of
initializing a repository, creating commits and cloning(clone is WIP) a public repository.
Along the way we'll learn about the .git
directory, Git objects (blobs,
commits, trees etc.), Git's transfer protocols and more.
Note: If you're viewing this repo on GitHub, head over to codecrafters.io to try the challenge.
It allows only the following commands:
Initializes an empty .git directory in the current folder
./your_git.sh init
Displays the content of an object given it's hash
./your_git.sh cat-file <object_hash>
Creates the hash of the given file
./your_git.sh hash-object <file_name>
Adds the current state of changes to git
./your_git.sh write-tree
Commits the tree object given tree hash
./your_git.sh commit-tree <tree_hash>
Displays the content of Tree object
./your_git.sh ls-tree <tree_hash>
Clones from the given https link(incomplete)
./your_git.sh clone <repo_link>