A simplified Git-like version control system built in C++.
MiniGit allows users to track versions of files, make commits, manage branches, perform merges, and compare commits โ all via command-line interaction and local file system operations.
โ
init โ Initialize a MiniGit repository
โ
add <filename> โ Stage a file for commit
โ
commit -m "<message>" โ Save staged changes with a message
โ
log โ View commit history
โ
branch <branchname> โ Create a new branch
โ
checkout <branch/commit> โ Switch to another branch or commit
โ
merge <branch> โ Merge a branch into the current branch
โ
diff <commit1> <commit2> โ Show differences between two commits
MiniGit/
โโโ MiniGit.cpp # Full unified implementation
โโโ test.txt, hello.txt # Sample test files
โโโ .minigit/ # MiniGit internal data
โ โโโ objects/ # Stored file snapshots (by hash)
โ โโโ commits/ # Commit metadata
โ โโโ HEAD.txt # Current branch pointer
โ โโโ branches.txt # Branch-to-commit map
โ โโโ index.txt # Staging area
g++ -std=c++17 MiniGit.cpp -o MiniGitg++ -std=c++17 MiniGit.cpp -o MiniGit.exe./MiniGit initecho Hello > hello.txt
./MiniGit add hello.txt./MiniGit commit -m "Initial commit"./MiniGit log./MiniGit branch dev
./MiniGit checkout dev./MiniGit checkout main
./MiniGit merge dev./MiniGit log # get commit hashes
./MiniGit diff <commit1> <commit2>The repo includes several trial files such as:
test.txt,hello.txt,file1.txt, etc.- These are used to demonstrate the add, commit, and diff functionality.
- โ
Full functionality in a single
MiniGit.cppfile - โ
All group contributions merged into
mainbranch - โ Sample test files and internal state included
- โ Clean commit history for grading and review
This project was developed by 2nd-year Software Engineering students at Addis Ababa University:
- Natnael Habteselassie
- Wengelle Yohannes
- Ezana Mulatu
- Samuel Abraham
- Omer Abubeker
โ
Fully Completed
๐งช Tested with multiple sample runs
๐ Ready for final submission