A Rust-powered version control system with Git-like functionality and modern architecture.
MUG is a hybrid VCS combining distributed version control with centralized features!
Repository Operations:
mug init- Initialize a new repositorymug add- Stage filesmug remove- Unstage filesmug commit- Create a commitmug log- View commit historymug show- Show commit detailsmug status- Show working tree status
Branching & Merging:
mug branch- Create branchesmug branches- List all branchesmug checkout- Switch branchesmug merge- Merge branches with fast-forward detectionmug rebase- Rebase current branch onto another
File Operations:
mug rm- Remove filesmug mv- Move/rename filesmug restore- Restore filesmug grep- Regex search across files
Commit History Control:
mug reset- Reset operations (soft/mixed/hard)mug diff- Show diffs between commitsmug cherry-pick- Cherry-pick a commit onto current branchmug cherry-pick-range- Cherry-pick a range of commitsmug bisect-start- Start a bisect sessionmug bisect-good- Mark commit as good during bisectmug bisect-bad- Mark commit as bad during bisect
Tag Management:
mug tag- Create annotated tagsmug tags- List tagsmug delete-tag- Delete tags
Stash Operations:
mug stash- Save work-in-progressmug stash-list- List stashesmug stash-pop- Apply and remove stash
Remote & Sync Operations:
mug remote add- Add remote repositoriesmug remote list- List remotesmug remote remove- Remove remotesmug remote set-default- Set default remotemug remote update-url- Update remote URLsmug push- Push to remotemug pull- Pull from remotemug fetch- Fetch from remotemug clone- Clone repositorymug serve- Start HTTP server for remote operations
Hook System:
- 6 hook types: pre-commit, post-commit, pre-push, post-push, pre-merge, post-merge
- Install hooks from scripts
- Hook execution with stdout/stderr capture
- Enable/disable hooks dynamically
Configuration & Metadata:
.mugignore- Pattern-based file exclusion.mugattributes- File attributes.mug/config.json- Repository configuration
Git Migration:
mug migrate <git-repo> <mug-repo>- Import Git repositories- Supports both loose objects and pack files
- Extracts full commit metadata
- Converts Git branches and HEAD to MUG format
Cryptographic Signing:
mug keys generate- Create Ed25519 keypairsmug keys import <seed>- Import keys from base64 seedmug keys list- List all signing keysmug keys current- Show active key- Immutable audit trail with Ed25519 signatures
Temporal Branching:
mug temporal create <name> <commit>- Create branch at any commitmug temporal list- Show all temporal branchesmug temporal show <branch>- Visualize temporal branch structuremug temporal merge <target> <source>- Merge branches at any point
Centralized Large File Storage:
mug store set-server <url>- Configure central object servermug store set-threshold <MB>- Set file size thresholdmug store config- Show current storage configurationmug store cache-stats- View LRU cache metricsmug store clear-cache- Clear local cache
cargo build --release
./target/release/mug --help
mug init
mug config set user.name "Your Name"
mug config set user.email "[email protected]"
mug add .
mug commit -m "Initial commit"Basic Workflow:
mug init
mug add .
mug commit -m "Initial commit" -a "Your Name"Work with Branches:
mug branch feature/new-feature
mug checkout feature/new-feature
mug add .
mug commit -m "Add feature"
mug checkout main
mug rebase feature/new-featurePush to Remote:
mug remote add origin https://example.com/repo.git
mug push -r origin -b mainStash Work:
mug stash
mug checkout other-branch
mug checkout main
mug stash-popUse Hooks:
echo "cargo fmt" > .mug/hooks/pre-commit
mug hook enable pre-commitObject Store:
- Content-addressable blob storage
- Tree snapshots for directory structures
- Automatic deduplication via SHA256
Index:
- Staging area for changes
- Tracks file paths and their hashes
- Persisted to Sled database
Commits:
- Immutable commit objects
- Metadata: author, message, timestamp, parent
- Full history traversal support
Branches:
- Named references to commits
- HEAD management
- Fast branch switching
Remote & Sync:
- Remote configuration and management
- Push/pull/fetch/clone operations
- Connection testing and URL validation
Hook System:
- Automatic hook discovery
- Flexible execution model
- Enable/disable controls
Ignore & Attributes:
- Pattern-based file exclusion
- Per-file configuration attributes
Database:
- Sled-backed lightweight embedded DB
- Separate trees for commits, branches, index, HEAD
- Flush-on-demand persistence
- Status: O(1) indexed lookup instead of O(n) tree walk
- Commits: Linked list traversal with minimal metadata
- Storage: Automatic deduplication via content addressing
- Branches: Instant creation and switching
- Parallel operations: Regex grep with Rayon parallelization
- ~3,600 lines of Rust code
- 100+ unit tests across 15 modules
- 26 feature modules with comprehensive test coverage
- Zero compiler warnings
Alpha 1 (Current) - Stable with all core and hybrid features implemented
Core Features:
- Repository initialization
- Complete staging and commit workflow
- Branch creation, switching, and merging
- Interactive and standard rebase
- Remote operations (push, pull, fetch, clone)
- HTTP server mode for remote access
- Full hook system
- Tag management
- Stash operations
- Cherry-pick and bisect
Hybrid VCS Features:
- Git repository migration (loose objects + pack files)
- Cryptographic signing (Ed25519)
- Temporal branching (non-linear history)
- Centralized large file storage with LRU cache
- Minimal metadata - Only track what's necessary
- Content-addressed - Use hashes as the source of truth
- Fast by default - No tree walking, clever indexing
- Simple interface - Clean commands, clear semantics
- Complete feature set - All essential VCS operations
- Research-driven - Novel branching, cryptographic signing, hybrid storage
- FEATURE_SUMMARY.md - Complete feature overview and CLI reference
- HYBRID_VCS.md - Architecture design decisions and innovation details
- RESEARCH_VCS_MODELS.md - VCS types analysis and comparison
- MIGRATION_COMPLETE.md - Git migration implementation details
Run tests:
cargo testBuild documentation:
cargo doc --openFormat code:
cargo fmtCheck for issues:
cargo clippyIf you discover a security vulnerability, please email [email protected] with:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if available)
Do not open public issues for security vulnerabilities.
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.
I need you please!!! We welcome contributions! Here's how you can help:
Getting Started:
- Fork the repository
- Create a feature branch (git checkout -b feature/amazing-feature)
- Make your changes
- Run tests: cargo test
- Run linter: cargo clippy
- Format code: cargo fmt
- Commit with clear messages
- Push to your fork
- Open a Pull Request
Contribution Areas:
- Performance: Optimization and caching improvements
- Features: Advanced merge/rebase, sparse checkout
- Documentation: Examples, tutorials, API docs
- Testing: Additional test coverage and edge cases
- Bug Fixes: Issues marked as help-wanted
This project is licensed under the GNU Lesser General Public License v3.0 - see LICENSE file for details.
By contributing, you agree that your contributions will be licensed under its LGPL v3 License.
