Run command on git repositories in parallel.
- macOS (64 bits)
- Linux: 32 bits / 64 bits
- Windows (64 bits)
go install github.com/jcgay/parallel-git-repo@latest
Configure the repositories list where command will be run in $HOME/.parallel-git-repositories
:
[repositories]
default = [
"/Users/jcgay/dev/maven-notifier",
"/Users/jcgay/dev/maven-color"
]
The group default
is mandatory.
You can create groups of repositories to separate them by concern:
[repositories]
default = [
"/Users/jcgay/dev/maven-color",
"/Users/jcgay/dev/buildplan-maven-plugin"
]
notifier = [
"/Users/jcgay/dev/maven-notifier",
"/Users/jcgay/dev/gradle-notifier"
]
Also define commands that you want to run on these repositories:
[commands]
fetch = "git fetch -p"
status = "git status"
pull = "git pull"
push = "git push $@"
checkout = "git checkout $@"
current-branch = "git rev-parse --abbrev-ref HEAD"
merge = "git merge --log --no-ff $@"
set-version = "mvn versions:set -DnewVersion=$1"
ismerged = "git branch --list $1 -r --merged"
contains = "git branch -r --contains $1"
This is a TOML
file.
parallel-git-repo -h
Example when running pull
command:
$> parallel-git-repo pull
maven-color: ✔
maven-notifier: ✔
parallel-git-repo run git remote -v
parallel-git-repo -g=notifier status
make release
make help