A lightweight Git-like version control tool built in C++ for learning purposes.
mkdir build && cd build
cmake ..
make# Initialize a new repository
./build/tig init
# Stage a file
./build/tig add <filename>Tig stores all version control data in a hidden .tig/ directory:
.tig/
├── HEAD ← Points to the current branch
├── objects/ ← Stores file content blobs (named by SHA-1 hash)
├── refs/heads/ ← Stores branch pointers
└── staging/index ← Tracks staged files (the "index")
When you tig add a file, its content is hashed with SHA-1 and stored as an object.
The staging index records which files are ready to be committed.