github.com/vrischmann/gitwrap

Run a git command on all sub repositories under the current working directory.


License
MIT
Install
go get github.com/vrischmann/gitwrap

Documentation

gitwrap

Run any Git command on all sub repositories under the current working directory.

Not suitable for scripting yet.

Usage

Usage is just like any Git command:

gitwrap status --short

Output:

PS G:\Gopath\src\github.com\vrischmann> gitwrap status --short
G:\Gopath\src\github.com\vrischmann\binary
G:\Gopath\src\github.com\vrischmann\commands
G:\Gopath\src\github.com\vrischmann\datalgo
?? bplustree/
?? btree/

G:\Gopath\src\github.com\vrischmann\envconfig
G:\Gopath\src\github.com\vrischmann\flagutil
G:\Gopath\src\github.com\vrischmann\ghmirror
?? build.ps1
?? ghmirror.bst

G:\Gopath\src\github.com\vrischmann\gitwrap
?? LICENSE
?? README.md

The repositories path are colored in yellow when run from a compatible terminal. Here you can see that in G:\Gopath\src\github.com\vrischmann\binary the output is empty.

Warning

The tool is dumb: there is no attempt at throttling the execution of the Git command right now. This means, if you run this in your home directory for example and you have hundreds or thousands of repositories it will run that many git commands in parallel.

Future work

It could be nice to make it scriptable (no color output, JSON output or whatever). I have no use for that at the moment though, so if you want it send me a PR !

License

gitwrap is licensed under the MIT license. See the LICENSE file.