mgit is a command-line tool for managing and executing commands across multiple Git repositories simultaneously.
Download
Download the latest version from the Releases page.
Install on Linux
App Binary
chmod +x mgit
sudo mv mgit /usr/local/bin/mgit
Shell Completion
Bash/Zsh/Fish (Linux)
sudo mv <mgit_completion> /etc/bash_completion.d/<mgit_completion>
source /etc/bash_completion.d/<mgit_completion>
Install on MacOS
App Binary
chmod +x mgit
sudo mv mgit /usr/local/bin/mgit
Shell Completion
Zsh (macOS)
mkdir -p ~/.zsh/completions
mv <_mgit> ~/.zsh/completions/
echo 'fpath+=~/.zsh/completions' >> ~/.zshrc
autoload -Uz compinit && compinit
Install on Windows
App Binary
Move-Item mgit.exe "$env:USERPROFILE\bin\mgit.exe"
# Ensure $env:USERPROFILE\bin is in your PATH
Shell Completion
PowerShell temporary use
go run ./ completion powershell > mgit_completion.ps1
. .\mgit_completion.ps1 # for temporary use
Build from source (requires Go to be installed)
Build Binaries
Linux/macOS
cd mgit
go build -o mgit
chmod +x mgit
sudo mv mgit /usr/local/bin/mgit
Windows (PowerShell or CMD)
cd mgit
go build -o mgit.exe
Move-Item mgit.exe "$env:USERPROFILE\bin\mgit.exe"
# Ensure $env:USERPROFILE\bin is in your PATH
Completion
bash
mgit completion bash > mgit_completion.bash
zsh
mgit completion zsh > mgit_completion.zsh
fish
mgit completion fish > mgit_completion.fish
powershell
mgit completion powershell > mgit_completion.ps1
Usage
Add repositories/projects
# Add a new repository to current project
mgit add repo --path <full-path> #name of the repository is automatically sourced from the end of the path
mgit add repo --path <full-path> --name custom-name
# Add a new project
mgit add project --name <project-name>
Delete repositories/projects
# Delete a repository from current project
mgit delete repo <repo-name>
# Delete a project
mgit delete project <project-name>
List repositories
# List repositories in current project
mgit list
# List repositories in a sepecified project
mgit list --project name
# List repositories in all projects
mgit list --all

Switch between projects
mgit switch <project-name>
Execute commands on repositories
mgit exec repo1 repo2 repo3 -- command
mgit exec -- command
Examples
- Add repositories to your workspace:
mgit add repo --path /home/username/projects/project1
mgit add repo -p /home/username/projects/project2
- Create and switch to a new project:
mgit add project work-projects
mgit switch work-projects
- Check status of specific repositories:
mgit exec project1 project2 -- git status
- Pull latest changes from all repositories in current project:
- List all tracked repositories across projects:
Configuration
mgit uses a SQLite database to store your repository information and projects. The database is automatically created at ~/.mgit as db.sqlite on first run.
It also keeps track of the current project in ~/.mgit/config.json
Contributing
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
License
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.