SVCS (Simple Version Control System) is an educational and research project aimed at implementing the fundamental principles of a distributed version control system (similar to Git) from scratch using C++.
The main goal of the project is to gain a deep understanding of core concepts:
- Immutable Objects: Creating and handling objects (
Commit,Blob,Tree) based on a single abstractVcsObjectclass. - Data Integrity: Applying cryptographic hashing (SHA-256) for data identification and verification.
- Clean Architecture: Implementing OOP principles, inheritance, polymorphism, and separation of concerns.
SVCS now provides a complete, production-ready command-line interface for version control. The system supports all essential VCS operations with a clean, intuitive API.
- ✅ Complete Command Suite: Full set of essential VCS commands
- ✅ Robust Object Model:
Blob,Tree, andCommitfully implemented - ✅ Advanced CLI: Intuitive command-line interface with help system
- ✅ Event-Driven Architecture: Flexible logging with EventBus pattern
- ✅ Memory Safety: Zero memory errors (Valgrind verified)
- ✅ Data Integrity: SHA-256 hashing for all repository objects
- ✅ Factory Pattern: Extensible command system
- ✅ Comprehensive Testing: Unit tests for core components
| Command | Usage | Description |
|---|---|---|
init |
svcs init [path] [--force] |
Initialize new repository |
add |
svcs add <file...> |
Add files to staging area |
save |
svcs save -m "message" |
Save staged changes to repository |
status |
svcs status [file...] |
Show working tree status |
remove |
svcs remove <file...> [--all] |
Remove files from staging area |
clear |
svcs clear [--force] |
Remove SVCS repository |
| Command | Usage | Description |
|---|---|---|
history |
svcs history |
Show commit history |
version |
svcs version |
Show version information |
help |
svcs help [command] |
Show help for commands |
svcs --version,svcs -v→ version informationsvcs --help,svcs -h→ general helpsvcs help <command>→ specific command help
# 1. Initialize repository
svcs init my-project
cd my-project
# 2. Create and track files
echo "Hello SVCS" > README.md
svcs add README.md
# 3. Check status
svcs status
# 4. Save changes
svcs save -m "Initial commit"
# 5. Continue development
echo "New feature" >> README.md
svcs add README.md
svcs save -m "Add new feature"
# 6. View history
svcs history
# 7. Get help
svcs help status| Command | Example | What You'll Learn |
|---|---|---|
init |
svcs init |
Repository initialization and structure |
add |
svcs add *.cpp |
Staging area mechanics and file tracking |
save |
svcs save -m "feat: add auth" |
Commit objects and message formatting |
status |
svcs status file.txt |
Working tree state management |
| Command | Example | Concept Demonstrated |
|---|---|---|
remove |
svcs remove temp.txt |
Staging area manipulation |
remove --all |
svcs remove --all |
Bulk operations with safety |
clear |
svcs clear --force |
Repository lifecycle management |
| Command | Example | Purpose |
|---|---|---|
version |
svcs version |
System information |
help |
svcs help status |
Built-in documentation |
| Layer | Components | Learning Value |
|---|---|---|
| Storage | Repository, ObjectStorage, Index |
Data persistence patterns |
| Objects | Blob, Tree, Commit |
Polymorphism and inheritance |
| CLI | CommandFactory, ICommand |
Factory and strategy patterns |
| Infra | EventBus, Logger |
Observer pattern and event handling |
- Command Pattern for extensible operations
- Observer Pattern for decoupled communication
- Factory Pattern for object creation
- Strategy Pattern for algorithm variation
- Immutable Objects for data integrity
- ✅ Complete Git-like command suite
- ✅ Robust object model with cryptographic integrity
- ✅ Professional CLI with help system
- ✅ Event-driven architecture
- ✅ Comprehensive testing suite
- ✅ Cross-platform compatibility
- ⏳ Branching and merging mechanics
- ⏳ Difference analysis with
diff - ⏳ Remote repository operations
- ⏳ Configuration management systems
Explore the complete technical documentation:
- English Documentation - Full API reference and architecture guide
- Russian Documentation - Документация на русском языке
SVCS © 2025 LogosITO.
Released under the MIT License - free for learning, sharing, and building upon.
"The best way to understand a tool is to build it yourself"