A production-ready, blazingly fast Git multi-remote synchronization tool
Push, pull, and sync your code across GitHub, GitLab, Bitbucket, Codeberg, Gitea/Forgejo with a single command
β¨ Available as both multigit and mg commands for your convenience! β¨
π Table of Contents
Features β’ Why MultiGit? β’ Quick Start β’ Installation β’ Usage β’ Configuration β’ Security β’ Examples β’ FAQ β’ Contributing β’ Roadmap
|
|
|
|
| Platform | Status | Features |
|---|---|---|
| GitHub | β Full Support | Public, Private, Enterprise |
| GitLab | β Full Support | Cloud, Self-hosted |
| Bitbucket | β Full Support | Cloud, Server |
| Codeberg | β Full Support | Public repositories |
| Gitea | β Full Support | Self-hosted instances |
| Forgejo | β Full Support | Self-hosted instances |
|
One command replaces dozens Instead of: git push origin main
git push github main
git push gitlab main
git push backup mainSimply: mg sync |
Never lose your code
|
Built for developers
|
| Traditional Workflow | With MultiGit | Time Saved |
|---|---|---|
| Push to 3 remotes manually | mg sync |
~2 minutes |
| Set up credentials for each platform | One-time interactive setup | ~15 minutes |
| Check sync status across platforms | mg status |
~5 minutes |
| Resolve conflicts manually | Interactive resolver | ~10 minutes |
| Total per day | ~30 minutes |
π° That's 180+ hours saved per year for a typical developer!
Get started in under 2 minutes! Here's the fastest path to multi-remote nirvana:
# 1οΈβ£ Initialize MultiGit in your repository
mg init # or 'multigit init'
# 2οΈβ£ Add remote platforms (you'll be prompted for credentials)
mg remote add github <username>
mg remote add gitlab <username>
mg remote add bitbucket <username>
# 3οΈβ£ Make some changes, then use the interactive commit helper
mg cc # Interactive conventional commit wizard
# Or use traditional git commands - they work too!
# 4οΈβ£ Sync to all remotes with one command! π
mg sync
# 5οΈβ£ Check sync status across all platforms
mg statusπ‘ Pro Tip: Use mg for lightning-fast typing or multigit for scripts - they're 100% identical!
$ mg sync
β Pushing to github... [ββββββββββββββββββββ] 100% (main)
β Pushing to gitlab... [ββββββββββββββββββββ] 100% (main)
β Pushing to bitbucket... [ββββββββββββββββββββ] 100% (main)
π Successfully synced to 3 remotes in 2.3s| Faster than sequential pushes | Platforms supported | Plain text credentials | Rust, no dependencies issues |
Choose your preferred installation method:
Download pre-built binaries for your platform from GitHub Releases:
Linux / macOS:
# Download the latest release
curl -LO https://github.com/TIVerse/multigit/releases/latest/download/multigit-linux-x64.tar.gz
# Extract and install
tar -xzf multigit-linux-x64.tar.gz
sudo mv multigit mg /usr/local/bin/
# Verify installation
mg --versionWindows (PowerShell):
# Download and run the installer
Invoke-WebRequest -Uri "https://github.com/TIVerse/multigit/releases/latest/download/multigit-windows-installer.exe" -OutFile "multigit-installer.exe"
.\multigit-installer.exe# Clone the repository
git clone https://github.com/TIVerse/multigit.git
cd multigit
# Build release binaries
cargo build --release
# Test the build
./target/release/multigit --version
./target/release/mg --version # Both binaries are built
# Optional: Install to system
cargo install --path .docker pull tiverse/multigit:latest
docker run --rm -v $(pwd):/repo tiverse/multigit mg statusπ Initialize a Repository
# Navigate to your Git repository
cd your-git-repository
# Initialize MultiGit
mg init
# MultiGit creates a .multigit/ directory with configuration
# β Configuration file created
# β Default settings applied
# β Ready to add remotes!π Managing Remote Platforms
# Add GitHub remote
mg remote add github your-username
# You'll be prompted for your Personal Access Token (PAT)
# Add GitLab remote
mg remote add gitlab your-username
# Add Bitbucket
mg remote add bitbucket your-username
# Add self-hosted Gitea/Forgejo
mg remote add mygitea your-username --url https://gitea.example.com
# Add Codeberg
mg remote add codeberg your-username
# List all configured remotes
mg remote list
# Remove a remote
mg remote remove github
# Update remote credentials
mg remote update gitlab --tokenπ Syncing & Pushing
# Push to all configured remotes
mg push
# Push to specific remote only
mg push --to github
# Push specific branch
mg push --branch develop
# Sync bidirectionally (pull + push)
mg sync
# Sync with conflict resolution
mg sync --interactive
# Force sync (β οΈ use with caution - may overwrite changes)
mg sync --force
# Dry run to preview sync
mg sync --dry-runπ₯ Pulling Changes
# Pull from primary remote (configured in settings)
mg pull
# Pull from specific remote
mg pull --from github
# Pull specific branch
mg pull --from gitlab --branch main
# Pull and rebase
mg pull --rebaseπ Status & Monitoring
# Check sync status across all remotes
mg status
# Detailed status with commit differences
mg status --verbose
# Check specific remote
mg status --remote github
# Watch mode (auto-refresh every 5s)
mg status --watchβοΈ Conventional Commits (Interactive)
# Launch interactive commit wizard
mg cc # or 'mg commit'
# The wizard helps you:
# β Select files to stage
# β Choose commit type (feat, fix, docs, style, refactor, test, chore)
# β Auto-detect scope from changed files
# β Add breaking change markers
# β Link to issues/tickets
# β Preview formatted commit message
# β Commit & optionally push
# Example output:
# ? Select commit type: feat
# ? Scope (optional): auth
# ? Short description: add OAuth2 support
# ? Breaking change?: No
# ? Issue reference: #42
#
# Preview: feat(auth): add OAuth2 support (#42)
#
# β Committed successfully!βοΈ Conflict Resolution
# List all detected conflicts
mg conflict list
# Resolve conflicts interactively
mg conflict resolve
# Choose resolution strategy
mg conflict resolve --strategy ours # Use local changes
mg conflict resolve --strategy theirs # Use remote changes
mg conflict resolve --strategy manual # Manual resolution
# Show conflict diff
mg conflict diffπ€ Daemon Mode (Background Sync)
# Start daemon with 5-minute sync interval
mg daemon start --interval 5m
# Start with hourly sync
mg daemon start --interval 1h
# Check daemon status
mg daemon status
# View daemon logs
mg daemon logs
# Stop daemon
mg daemon stop
# Restart daemon
mg daemon restart
# Configure daemon to run on system startup
mg daemon enable-startupπ Health Check & Diagnostics
# Run comprehensive health check
mg doctor
# The doctor command checks:
# β Git installation and version
# β Remote connectivity
# β Authentication status
# β Configuration validity
# β Repository integrity
# β Network connectivity
# Auto-fix common issues
mg doctor --fix
# Verbose diagnostics
mg doctor --verbose|
Mirror a project to GitLab mg remote add gitlab username
mg push --to gitlab |
Daily auto-sync mg daemon start --interval 24h |
|
Backup to multiple hosts mg remote add github user
mg remote add gitlab user
mg sync |
Check all remotes status mg status --verbose |
|
Emergency conflict fix mg conflict list
mg conflict resolve --interactive |
Test connectivity mg doctor --verbose |
# Chain commands for complex workflows
mg pull --from github && mg cc && mg push
# Use in CI/CD pipelines
mg init && mg remote add gitlab $CI_USERNAME && mg push --to gitlab
# Scheduled sync with cron
# Add to crontab: 0 */6 * * * cd /path/to/repo && mg sync
# Multi-branch sync
for branch in main develop staging; do
git checkout $branch
mg sync --branch $branch
doneMultiGit uses a hierarchical configuration system with sensible defaults:
π§ CLI Flags (highest priority)
β
π Repository Config (.multigit/config.toml)
β
π User Config (~/.config/multigit/config.toml)
β
βοΈ Default Settings (lowest priority)
Create a .multigit/config.toml in your repository or ~/.config/multigit/config.toml for global settings:
# ====================================
# MultiGit Configuration
# ====================================
[settings]
# Default branch to sync
default_branch = "main"
# Enable parallel operations for speed
parallel_push = true
max_parallel = 4
# Verbose output
verbose = false
[sync]
# Automatic sync when daemon is running
auto_sync = false
# Primary source for pulling
primary_source = "github"
# Merge strategy: "fast-forward", "rebase", "merge"
strategy = "fast-forward"
# Conflict resolution: "abort", "ours", "theirs", "interactive"
conflict_resolution = "interactive"
[security]
# Authentication backend: "keyring" (recommended) or "encrypted-file"
auth_backend = "keyring"
# Enable audit logging
audit_log = true
# Encrypt local config
encrypt_config = true
[daemon]
# Background sync interval (e.g., "5m", "1h", "24h")
sync_interval = "1h"
# Enable webhook server
webhook_enabled = false
webhook_port = 8080
[ui]
# Progress bar style: "bar", "spinner", "quiet"
progress_style = "bar"
# Color output
color = "auto" # "auto", "always", "never"
# Show notifications
notifications = true
[remotes.github]
username = "your-username"
enabled = true
# Optional: Custom API URL for GitHub Enterprise
# api_url = "https://github.company.com"
[remotes.gitlab]
username = "your-username"
api_url = "https://gitlab.com"
enabled = true
[remotes.bitbucket]
username = "your-username"
enabled = false
[remotes.codeberg]
username = "your-username"
enabled = true
[remotes.mygitea]
username = "your-username"
api_url = "https://gitea.example.com"
enabled = true# View current configuration
mg config show
# Set a configuration value
mg config set sync.strategy rebase
# Edit configuration in your default editor
mg config edit
# Validate configuration
mg config validate
# Reset to defaults
mg config resetπ‘οΈ Security is our top priority. Your credentials are never compromised.
|
|
# Add credentials interactively (recommended)
mg remote add github username
# π You'll be prompted for your Personal Access Token
# β Token encrypted and stored in OS keyring
# β Never appears in plain text
# Verify credential storage
mg config show --security|
Use PATs Personal Access Tokens, not passwords |
Rotate Regularly Update tokens periodically |
Minimal Scope Grant only needed permissions |
Audit Logs Review security logs regularly |
Found a security vulnerability? Please DO NOT open a public issue. Instead:
- π§ Email: security@tiverse.dev
- π Use GitHub Security Advisory
- β±οΈ We'll respond within 24-48 hours
MultiGit follows a clean, modular architecture designed for extensibility and maintainability:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend Layer β
β ββββββββββββ ββββββββββββ ββββββββββββ βββββββββββ β
β β CLI β β TUI β β Daemon β β API β β
β ββββββββββββ ββββββββββββ ββββββββββββ βββββββββββ β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββ
β Core Engine β
β ββββββββββββββββ βββββββββββββββ ββββββββββββββββββ β
β β Sync Manager β β Conflict β β Scheduler β β
β β β β Resolver β β β β
β ββββββββββββββββ βββββββββββββββ ββββββββββββββββββ β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββ
β Platform Adapters β
β ββββββββββ ββββββββββ ββββββββββββ ββββββββββββββ β
β β GitHub β β GitLab β βBitbucket β βGitea/Forge β β
β ββββββββββ ββββββββββ ββββββββββββ ββββββββββββββ β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββ
β Git Operations Layer β
β (libgit2 wrapper) β
β βββββββββ ββββββββ βββββββββ βββββββββββββββββββ β
β β Clone β β Push β β Pull β β Conflict Detect β β
β βββββββββ ββββββββ βββββββββ βββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
Frontend Layer
|
Core Engine
|
Platform Adapters
|
Git Layer
|
We β€οΈ contributions! Whether you're fixing bugs, adding features, or improving docs, we welcome your help.
|
1οΈβ£ Fork & Clone git clone https://github.com/YOUR_USERNAME/multigit.git
cd multigit |
2οΈβ£ Create Branch git checkout -b feature/amazing-feature |
3οΈβ£ Make Changes # Make your changes
cargo test
cargo fmt |
# 4οΈβ£ Commit with conventional commits
git commit -m 'feat: add amazing feature'
# 5οΈβ£ Push and create PR
git push origin feature/amazing-feature- π Read our Contributing Guide for detailed guidelines
- β
Ensure all tests pass:
cargo test - π¨ Format your code:
cargo fmt - π Run linter:
cargo clippy - π Update documentation if needed
- βοΈ Use Conventional Commits
|
Bug Fixes Help squash bugs |
Documentation Improve our docs |
UI/UX Better user experience |
Testing More test coverage |
|
Core Functionality
|
Advanced Features
|
| Version | Features | Status |
|---|---|---|
| v2.1.0 | TUI Dashboard, Interactive status viewer | π§ In Progress |
| v2.2.0 | Git LFS support, Submodule sync | π Planned |
| v2.3.0 | Workspace management (multi-repo) | π Planned |
| v3.0.0 | Webhook server, GUI with Tauri | π Future |
View Detailed Roadmap
v2.1.0 - Enhanced UI (Q1 2025)
- Full-screen TUI dashboard with ratatui
- Real-time sync monitoring
- Interactive conflict resolution UI
- Customizable themes
v2.2.0 - Advanced Git Features (Q2 2025)
- Git LFS support for large files
- Submodule synchronization
- Partial clone support
- Shallow clone optimization
v2.3.0 - Workspace Management (Q3 2025)
- Multi-repository workspaces
- Bulk operations across repos
- Workspace templates
- Dependency graph visualization
v3.0.0 - Integration & GUI (Q4 2025)
- Webhook server for push events
- REST API for integrations
- Native GUI application with Tauri
- Plugin system
This project is licensed under the MIT License - see the LICENSE file for details.
Check out the examples/ directory for complete working examples:
- basic_usage.rs - Configuration and remote management
- scheduler_example.rs - Periodic task scheduling
- ui_formatting.rs - Beautiful terminal output
Run examples with:
cargo run --example basic_usage
cargo run --example scheduler_example
cargo run --example ui_formatting| Category | Command | Description |
|---|---|---|
| Setup | mg init |
Initialize MultiGit in repository |
mg remote add <platform> <user> |
Add a new remote platform | |
| Sync | mg sync |
Bidirectional sync all remotes |
mg push |
Push to all remotes | |
mg pull |
Pull from primary remote | |
mg status |
Check sync status | |
| Commits | mg cc |
Interactive conventional commit |
mg commit |
Alias for cc | |
| Daemon | mg daemon start --interval 1h |
Start background sync daemon |
mg daemon status |
Check daemon status | |
mg daemon stop |
Stop daemon | |
| Config | mg config show |
View current configuration |
mg config edit |
Edit configuration | |
| Health | mg doctor |
Run health diagnostics |
mg doctor --fix |
Auto-fix common issues | |
| Conflicts | mg conflict list |
List all conflicts |
mg conflict resolve |
Resolve conflicts interactively |
| OS | Architecture | Status | Download |
|---|---|---|---|
| π§ Linux | x86_64 | β Supported | Download |
| π§ Linux | aarch64 (ARM) | β Supported | Download |
| π macOS | Intel (x86_64) | β Supported | Download |
| π macOS | Apple Silicon (M1/M2) | β Supported | Download |
| πͺ Windows | x86_64 | β Supported | Download |
| πͺ Windows | ARM64 | π§ Coming Soon | - |
Open Source Maintainers
- Mirror repositories across GitHub, GitLab, and self-hosted platforms
- Ensure availability if one platform goes down
- Reach wider audiences on different platforms
Enterprise Teams
- Maintain internal GitLab and external GitHub repos in sync
- Backup to multiple locations automatically
- Comply with data residency requirements
Individual Developers
- Keep personal and work accounts synchronized
- Showcase work on multiple platforms for visibility
- Automatic backups with daemon mode
CI/CD Pipelines
- Deploy to multiple hosting platforms from one source
- Test across different Git hosting APIs
- Automated synchronization in workflows
| Feature | MultiGit | Shell Scripts | Git Aliases | Manual Sync |
|---|---|---|---|---|
| Multi-remote push | β One command | β Very tedious | ||
| Conflict detection | β Automatic | β Manual | β Manual | β Manual |
| Secure credentials | β OS keyring | |||
| Progress tracking | β Real-time UI | β No | β No | β No |
| Daemon mode | β Built-in | β No | β No | |
| Cross-platform | β Native binaries | β Yes | β Yes | |
| API support | β All major platforms | β No | β No | |
| Error recovery | β Automatic retry | β No | β No | |
| Conventional commits | β Interactive wizard | β No | β No | |
| Configuration | β TOML + CLI | N/A |
|
π― Purpose-Built Unlike generic scripts, MultiGit is designed specifically for multi-remote sync with robust error handling and conflict resolution. |
π Security First Native OS keyring support means your credentials are never stored in plain text or version control. |
β‘ Performance Parallel async operations make syncing multiple remotes faster than sequential git commands. |
How is this different from git remote add?
Git's native remote support requires you to push/pull each remote individually. MultiGit:
- Pushes to all remotes with one command
- Detects and resolves conflicts automatically
- Manages authentication securely
- Provides daemon mode for automatic syncing
- Offers rich CLI/TUI experience
Does MultiGit work with private repositories?
Yes! MultiGit fully supports private repositories on all platforms. You'll need to provide a Personal Access Token (PAT) with appropriate permissions when adding a remote.
Can I use MultiGit in CI/CD pipelines?
Absolutely! MultiGit is designed for automation:
# Example GitHub Actions workflow
- name: Sync to GitLab
run: |
mg init
mg remote add gitlab ${{ secrets.GITLAB_USERNAME }}
mg push --to gitlabHow does MultiGit handle merge conflicts?
MultiGit provides three conflict resolution modes:
- Interactive (default) - Prompts you to resolve conflicts
- Abort - Stops sync and preserves current state
- Strategic - Use
--strategy ours/theirsto auto-resolve
You can configure the default behavior in your config file.
Is my authentication information secure?
Yes! MultiGit uses:
- OS Keyring (macOS Keychain, Windows Credential Manager, Linux Secret Service)
- Age Encryption as fallback
- Zero plain text - Never stores credentials in files
Can I sync only specific branches?
Yes! Use the --branch flag:
mg sync --branch main
mg push --branch develop --to githubWhat happens if one remote fails?
MultiGit continues syncing to other remotes and reports which operations succeeded/failed. You can review errors and retry with mg sync --retry.
Does MultiGit support Git LFS?
Git LFS support is planned for v2.0.0. Follow issue #XX for updates.
Can I use this with monorepos or workspaces?
Single-repo support is stable in v2.0.0. Workspace management for multiple repositories is coming in a future release.
How do I report bugs or request features?
We love feedback! Please:
- π Report bugs
- π‘ Request features
- π¬ Join discussions
MultiGit stands on the shoulders of giants:
- π¦ Built with Rust - Performance and safety
- π Git operations powered by libgit2 - Robust Git internals
- π¨ Terminal UI with ratatui - Beautiful TUI
- β‘ Async runtime by Tokio - Blazing fast concurrency
- π― CLI framework with clap - Powerful argument parsing
- π Secure storage with keyring - OS-native credentials
|
Report Bugs |
Request Features |
Join Discussions |
Read Docs |
If MultiGit has helped you, please consider:
β Starring this repository to show your support
π¦ Sharing it with your network
π€ Contributing to make it even better
β Sponsoring the project (coming soon)
Made with β€οΈ by the TIVerse Team
Β© 2024 TIVerse. Licensed under MIT.