parallel-git-repo

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2017 License: MIT Imports: 16 Imported by: 0

README

parallel-git-repo

Run command on git repositories in parallel.

Installation

Binaries
Go style
go get github.com/jcgay/parallel-git-repo

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 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

Build Status Code Report Coverage Status

Release
make release
List available tasks
make help

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL