https://github.com/jcgay/parallel-git-repo
Run command on git repositories in parallel
https://github.com/jcgay/parallel-git-repo
git go parallel
Last synced: about 1 year ago
JSON representation
Run command on git repositories in parallel
- Host: GitHub
- URL: https://github.com/jcgay/parallel-git-repo
- Owner: jcgay
- License: mit
- Created: 2016-03-13T16:16:47.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-10-26T08:16:13.000Z (over 2 years ago)
- Last Synced: 2025-04-19T22:34:50.283Z (about 1 year ago)
- Topics: git, go, parallel
- Language: Go
- Size: 3.62 MB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# parallel-git-repo
Run command on git repositories in parallel.
## Installation
### Binaries
- [macOS (64 bits)](https://bintray.com/jcgay/tools/download_file?file_path=v1.0.1%2Fparallel-git-repo-darwin-amd64)
- Linux: [32 bits](https://bintray.com/jcgay/tools/download_file?file_path=v1.0.1%2Fparallel-git-repo-linux-386) / [64 bits](https://bintray.com/jcgay/tools/download_file?file_path=v1.0.1%2Fparallel-git-repo-linux-amd64)
- [Windows (64 bits)](https://bintray.com/jcgay/tools/download_file?file_path=v1.0.1%2Fparallel-git-repo-windows-amd64)
### Go style
go install github.com/jcgay/parallel-git-repo@latest
## Configuration
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`](https://github.com/toml-lang/toml) file.
## Usage
### List available commands:
parallel-git-repo -h
Example when running `pull` command:
```
$> parallel-git-repo pull
maven-color: ✔
maven-notifier: ✔
```
### Run an arbitrary command:
parallel-git-repo run git remote -v
### Run command for a specific group
parallel-git-repo -g=notifier status
## Build
### Status
[](https://travis-ci.org/jcgay/parallel-git-repo)
[](https://goreportcard.com/report/github.com/jcgay/parallel-git-repo)
[](https://coveralls.io/github/jcgay/parallel-git-repo?branch=master)
### Release
make release
### List available tasks
make help