Skip to content

armanchhetri/build-your-own-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

progress-banner

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:

Init

Initializes an empty .git directory in the current folder

./your_git.sh init

Catfile

Displays the content of an object given it's hash

./your_git.sh cat-file <object_hash>

Hash-Object

Creates the hash of the given file

./your_git.sh hash-object <file_name>

Write-Tree/add

Adds the current state of changes to git

./your_git.sh write-tree

Commit-Tree/Commit

Commits the tree object given tree hash

./your_git.sh commit-tree <tree_hash>

Ls-Tree

Displays the content of Tree object

./your_git.sh ls-tree <tree_hash>

Clone

Clones from the given https link(incomplete)

./your_git.sh clone <repo_link>

About

Small version of GIT implemented from scratch.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published