MUG can import complete Git repositories, preserving all commits and metadata.
mug migrate /path/to/git/repo /path/to/new/mug/repoCommits:
- All commits with full metadata
- Author and committer information
- Timestamps
- Commit messages
- Parent relationships
Branches:
- All branch references
- Branch names
- Head position
Tags:
- Tag references
- Tag names
- Tag messages (if annotated)
Objects:
- All blob objects
- All tree objects
- Direct transfer to MUG object store
Loose Objects:
- Standard Git object files
- Located in
.git/objects/ - Automatically decompressed
Pack Files:
- Git pack files (
.pack) - Index files (
.idx) - Full support for all versions
Mixed Repositories:
- Combination of loose and packed objects
- Automatic detection
- Seamless migration
Time:
- 33 commits: <1 second
- 100 commits: 1-2 seconds
- 1000 commits: 10-20 seconds
Depends on:
- Number of commits
- Repository size
- Object compression
- Disk I/O speed
Space:
- No duplication
- Direct object transfer
- Compression maintained
- Minimal overhead
Migrate Repository:
mug migrate ~/old-repo ~/new-repo
cd ~/new-repoVerify Migration:
mug log
mug status
mug verifyConfigure MUG:
mug config set user.name "Your Name"
mug config set user.email "you@example.com"Continue Working:
mug branch feature/new
mug checkout feature/new
mug add .
mug commit -m "New commit in MUG"Full History:
- All commits preserved exactly
- Parent relationships maintained
- Linear and merge commits both work
Authorship:
- Original author preserved
- Timestamp preserved
- Commit message preserved
References:
- Branch names preserved
- Tag references preserved
- HEAD position preserved
No Shallow History:
- Full commit history always imported
- Cannot selectively import commits
- Cannot skip early history
No Submodule Conversion:
- Submodules treated as regular objects
- May need manual cleanup
No LFS Conversion:
- Git LFS pointers imported as-is
- Actual LFS files not converted
- May need to reconfigure LFS
- Verify Repository:
mug verify- Check Log:
mug log --oneline- Configure Identity:
mug config set user.name "Name"
mug config set user.email "email@example.com"- Set Up Remotes:
mug remote add origin <url>- Test Operations:
mug branch test
mug checkout test
mug add .
mug commit -m "Test"Migration Fails:
- Check paths are correct
- Verify source is valid Git repo
- Check disk space
- Check file permissions
Slow Migration:
- Network latency?
- Large pack files?
- System load high?
- Use local path for faster transfer
Missing Objects:
- Run
mug verify - Check source repository
- Ensure pack files are complete
- Check for corruption
Object Parsing:
- Decompresses Git objects using zlib
- Parses object structure
- Extracts commit metadata
- Validates object hashes
Tree Building:
- Reconstructs file trees
- Creates tree objects in MUG format
- Maintains directory structure
- Preserves file permissions
Commit Reconstruction:
- Extracts parent references
- Preserves message text
- Keeps author information
- Maintains timestamps
Reference Mapping:
- Maps branch references
- Sets HEAD correctly
- Preserves tag information
- Maintains reference structure
Before Migration (Git):
.git/objects/- Pack and loose objects.git/refs/- Branch and tag references.git/HEAD- Current branch.git/config- Configuration
After Migration (MUG):
.mug/objects/- Equivalent object store.mug/db/- Database with refs.mugignore- Ignore patterns.mug/config.json- Configuration
Migrate to Specific Version:
cd ~/old-repo
git checkout v1.0.0
cd ~/original-path
mug migrate ~/old-repo ~/v1-repoIncremental Migration:
- Not supported
- Import entire history
- Can filter afterward if needed
Reverse Migration:
- Export MUG to Git (future enhancement)
- Currently one-way process
- Consider keeping original Git repo
After Migration:
- MUG fully independent of Git
- No Git installation needed
- Standard MUG operations work
- Remote operations compatible
Dual VCS:
- Keep both Git and MUG temporarily
- Pull from Git, push to MUG
- Verify data integrity
- Delete Git when confident
Verify Successful Migration:
mug logshows all commitsmug verifyreports no errors- All branches present in
mug branches mug statusworks correctlymug showdisplays full commit info
Before Migration:
- Backup original Git repository
- Create test directory
- Test migration process
- Verify results
- Keep original until confident
Data Safety:
- Migration reads source
- Does not modify source
- Safe to retry
- Always keep backup
For detailed technical documentation, see:
- HYBRID_VCS.md - Architecture overview
- DOCS.md - Command reference
- README.md - Feature list
After successful migration:
- Configure MUG with your identity
- Set up remote repositories
- Start using normal MUG workflows
- Archive original Git repository
- Update CI/CD pipelines