git-multi v0.1.4
GIT multi
The most stupid way to run a git command on multiple repositories.
Install
Install this library via NPM:
npm -g install git-multiHow it works
git-multi runs a git command sequentially on 2+ repositories. This can be useful when you have a project spread on more repositories (ie. an app repository and some dependencies, like libraries or plugins) and you want to run the same exact git command on the main repository and it dependencies.
Setup
cd <main repository>- create
.gitmultifile - add to
.gitmultithe path to any repository you want to manage with git-multi (1 per line)
Then, in the <main repository> you can run any git command like this:
git multi statusAnd it will run git status in the <main repository> and all dependencies repositories (configured in .gitmulti).
Example
If you have the following repositories:
/workspace/main-app
/workspace/lib-1
/workspace/lib-2You can configure git-multi on your main-app:
echo "../lib-1" >> /workspace/main-app/.gitmulti
echo "../lib-2" >> /workspace/main-app/.gitmultiAnd then run:
cd /workspace/main-app
git multi statusSyntax
Run any git command on multiple repositories:
git multi <any git command>List repositories managed by git-multi:
git multi list