A modern version control system built in Rust, inspired by Git and Jujutsu (jj).
- Repository Management: Initialize, clone, and manage repositories
- Content-Addressable Storage: Efficient object storage with deduplication
- Staging Area: Track changes and prepare commits
- Commit System: Create and manage commits with metadata
- Branch Management: Create, switch, and merge branches
- Diff Engine: Compare files and generate patches
- Three-Way Merging: Automatic conflict resolution with manual fallback
- Remote Operations: Push, pull, and sync with remote repositories
- Operation Log: Track all repository operations with undo capability
- Change IDs: Immutable identifiers for changes
- Working Copy as Commit: Treat working directory as a commit
- Describe Command: Update commit messages after creation
- New Command: Create new changes based on existing ones
- Comprehensive Error Handling: Detailed error messages and recovery
- Cross-Platform Support: Works on Windows, macOS, and Linux
- Efficient Storage: Compressed object storage
- Conflict Resolution: Advanced merge conflict handling
- Configuration Management: User and repository settings
- CLI Interface: Full-featured command-line interface
cargo install --path .mvcs initmvcs config --global user.name "Your Name"
mvcs config --global user.email "[email protected]"mvcs add .
mvcs commit -m "Initial commit"mvcs branch feature-branch
mvcs checkout feature-branchmvcs status
mvcs log
mvcs diffmvcs remote add origin https://example.com/repo.git
mvcs push origin main
mvcs pull origin mainmvcs init [directory]- Initialize a new repositorymvcs clone <url> [directory]- Clone a repositorymvcs add <files>- Add files to staging areamvcs commit -m "message"- Create a commitmvcs status- Show working tree statusmvcs log- Show commit historymvcs diff- Show changes
mvcs branch- List branchesmvcs branch <name>- Create a branchmvcs branch -d <name>- Delete a branchmvcs checkout <branch>- Switch branchesmvcs checkout -b <name>- Create and switch to branch
mvcs merge <branch>- Merge a branchmvcs merge --no-ff <branch>- Force merge commit
mvcs remote add <name> <url>- Add a remotemvcs remote list- List remotesmvcs push <remote> <branch>- Push to remotemvcs pull <remote> <branch>- Pull from remote
mvcs show <object>- Show object detailsmvcs reset [--hard|--soft] [commit]- Reset to commitmvcs describe -m "message" [change]- Update commit messagemvcs new [base]- Create new changemvcs oplog- Show operation log
- Blobs: File content
- Trees: Directory structure
- Commits: Snapshots with metadata
- Compressed Storage: All objects are compressed with zlib
- Staging Area: Prepare commits incrementally
- Conflict Resolution: Handle merge conflicts with stages
- File Status Tracking: Track added, modified, deleted files
.mvcs/
├── objects/ # Content-addressable object storage
├── refs/
│ ├── heads/ # Branch references
│ └── remotes/ # Remote branch references
├── index # Staging area
├── HEAD # Current branch/commit reference
├── config # Repository configuration
└── oplog # Operation log
Every operation is logged with:
- Operation ID and timestamp
- User information
- Before/after commit hashes
- Operation description
Each commit has:
- Content hash (traditional)
- Change ID (immutable, survives rebases)
- Working directory is treated as a commit
- Enables advanced workflows
- Simplifies conflict resolution
cargo build --releasecargo testcargo run -- <command>| Feature | Git | mvcs |
|---|---|---|
| Object Storage | ✓ | ✓ |
| Branches | ✓ | ✓ |
| Merging | ✓ | ✓ (improved) |
| Remotes | ✓ | ✓ |
| Operation Log | ✗ | ✓ |
| Change IDs | ✗ | ✓ |
| Working Copy Commits | ✗ | ✓ |
| Conflict Resolution | Basic | Advanced |
| Feature | jj | mvcs |
|---|---|---|
| Change IDs | ✓ | ✓ |
| Operation Log | ✓ | ✓ |
| Working Copy Commits | ✓ | ✓ |
| Git Compatibility | ✓ | Partial |
| Conflict Resolution | ✓ | ✓ |
| Performance | High | High |
MIT License - see LICENSE file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
- Git interoperability
- Advanced merge algorithms
- Distributed operation log
- Web interface
- IDE integrations
- Performance optimizations
- Advanced conflict resolution UI