This project is implemented in Rust and aims to provide a minimalistic clone of some fundamental git
commands.
This is a challenge from codecrafter.io.
git init
: Initializes a repository by creating a.git
directory along with its foundational files.- Read Blob: Extract the content of a blob from your git repository by fetching it from the
.git/objects
directory. - Add Blob: Introduce a blob to your git repository by leveraging the
git hash-object
command. git ls-tree
: Used for inspecting a tree object.- Write Tree: Upon invoking the program with
./your_git.sh write-tree
, it writes the entire working directory as a tree object and subsequently prints the 40-character SHA. git commit-tree
: A plumbing command that facilitates the creation of a commit.
- Ensure you have Rust installed on your system.
- Clone the repository and navigate to its directory.
- Use the command
./your_git.sh <command>
where<command>
can be any of the supported features listed above.