Skip to content

A simplified implementation of Git, written in Go, supporting basic commands like init, add, status, commit, etc. Designed as an educational tool to explore how Git works under the hood.

License

Notifications You must be signed in to change notification settings

ritsource/a-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This simplified implementation of Git, written in Go, to help understand how Git works under the hood. It supports a subset of Git commands with a focus on clarity and correctness.


✨ Features

The following Git-like commands are currently implemented:

  • init – Initialize a new repository
  • add – Add files to the staging area
  • rm – Remove files from the staging area and working directory
  • status – Show the working tree status
  • commit – Record changes to the repository
  • log – Show commit logs

📦 Installation

Clone the repository:

git clone https://github.com/yourusername/a-git.git
cd a-git

Build the binary:

go build -o a-git .

🚀 Usage

Commands work similarly to Git.

./a-git init
echo "Hello, world!" > hello.txt
./a-git add hello.txt
./a-git commit -m "Add hello.txt"
./a-git log

About

A simplified implementation of Git, written in Go, supporting basic commands like init, add, status, commit, etc. Designed as an educational tool to explore how Git works under the hood.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published