A Go CLI utility that executes Git commands across multiple repositories at once. Run it from a parent directory and it operates on every immediate subdirectory that contains a .git folder.
git clone https://github.com/twrusstw/git-multi.git
cd git-multi
make install
exec zsh # or exec bashmake install builds the binary, copies it to /usr/local/bin/gitmulti, and writes the completion block directly into your detected shell RC file.
gitmulti <subcommand> [args] [-C directory]
| Subcommand | Description |
|---|---|
pull [--rebase] [branch] |
Pull (ff-only → stash+pull → group conflict menu) |
push [branch] |
Push; auto-sets upstream for new branches |
fetch |
Fetch then show ahead/behind/dirty table |
switch <branch> |
Switch branch (stash/discard/cancel on dirty repos) |
switch -s <branch> |
Stash and reapply changes before switch |
switch -d <branch> |
Discard tracked and untracked changes before switch |
branch |
Show ahead/behind/dirty status table |
branch -a [keyword] |
List all unique branches (optional filter) |
branch -ag [keyword] |
List branches grouped by repository |
branch --find <keyword> |
Find branches matching keyword across repos |
branch -d <name> [--remote] |
Delete branch (confirm per repo) |
branch -D <name> [--remote] |
Force-delete branch (warns if unmerged) |
branch -m <old> <new> |
Rename branch (offers remote sync) |
branch -n <name> |
Create new branch in repos with changes |
status |
Show file-level changes for repos with changes |
stash |
Stash changes in all dirty repos |
stash pop |
Pop stash (shows conflicts with resolution hint) |
stash apply |
Apply stash without dropping it |
stash list |
List stash entries for all repos |
discard |
Discard all changes (prompts first) |
Flags:
| Flag | Description |
|---|---|
-C <path> |
Target a single repository directory |
# Switch all repos to develop
gitmulti switch develop
# Pull main in all repos
gitmulti pull main
# Show branch status across all repos
gitmulti branch
# List all branches matching a keyword
gitmulti branch -a hotfix
# List branches grouped by repo
gitmulti branch -ag
# Operate on a single repo
gitmulti pull main -C my-service
# Create a new branch in repos with changes
gitmulti branch -n feat/my-featureTab completion is set up automatically during installation for both bash and zsh.
gitmulti <TAB> # list subcommands
gitmulti switch <TAB> # list available branches
gitmulti pull -C <TAB> # list git repo directoriesmake uninstallRemoves the binary, any legacy completion install directory, and the completion entry from your shell RC files.
MIT