Skip to content

devanshibhatt23/Tig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tig — A Simple Version Control System

A lightweight Git-like version control tool built in C++ for learning purposes.

Build

mkdir build && cd build
cmake ..
make

Usage

# Initialize a new repository
./build/tig init

# Stage a file
./build/tig add <filename>

How It Works

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.

About

A Git implementation built from scratch designed to learn how version control systems work

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors