This is a C++ implementation of a minimal Git-like version control system.
MiniGitWithCpp is a simplified Git implementation written in C++ that demonstrates core Git concepts including:
- Object storage (blob, tree, commit)
- Delta compression
- Pack file handling
- Basic Git operations (init, add, commit, clone)
- Object Model: Implements Git's object model with blob, tree, and commit objects
- Delta Compression: Supports Git's delta compression for efficient storage
- Pack Files: Handles Git pack files for network transfer optimization
- HTTP Protocol: Implements Git's smart HTTP protocol for cloning
- Testing: Comprehensive unit tests using Google Test framework
mkdir build
cd build
cmake ..
make# Initialize a repository
./git init
# Hash a file
./git hash-object <file>
# Write tree
./git write-tree
# Commit
./git commit-tree <tree-sha> -m "commit message"
# Clone from remote
./git clone <url> <directory>cd build
ctest- C++20 compiler
- CMake 3.13+
- zlib
- OpenSSL
- libcurl
- Google Test (auto-downloaded if not present)
This project is part of the Build your own Git challenge on CodeCrafters.