Perl wrapper for easily multiplying git commands to a selection of configured repositories.
Copy multigit into your execution path.
Copy .multigit.conf into your home directory and modify it to your liking.
Assuming the configuration file as it were would be correct for you -- which it is not! --
you would have these git repositories configured for multigit:
- /usr/work/hal9000/base
- /usr/work/hal9000/persistence
- /usr/work/hal9000/reasoning
- /usr/work/hal9000/logic
- /usr/work/hal9000/speech_synthesis
- /usr/work/hal9000/light_control
- /usr/work/hal9000/air_lock
- /usr/work/hal9000/life_support
- /usr/work/hal9000/camera
and you would have grouped the repositories like this:
- Backend systems: base, persistence, reasoning and logic
- Frontend systems: speech_synthesis and light_control
- Interfaces: air_lock, life_support and camera
In your current project you work with these repositories:
- base
- persistence
- light_control
- air_lock
Therefore you set the defaultParams to BP1v.
Typical workflow:
multigit checkout mastermultigit pullmultigit checkout -b new_branch- work in those repositories:
multigit diffmultigit commit -am "A very helpful commit message"- ...
multigit push
-
multigitdelegate anything togit. It just moves into the correct repositories first, therefore it is irrelevant from where you call it. -
You can sequence multiple git commands using a command delimiter (defaults to %%), e.g.
multigit co master %% pull %% status -
For usage on your coding machine you should set your
defaultParamsto include every repository.multigits output includes the parameter values for each repository so that you can easily adapt your command line string. -
For usage on a specialized system you can set yout
defaultParamsto ignore everything not relevant there. -
It may be useful to set up some aliases for different repository presets, like:
- alias mgFoo ='multigit -BP1v'
- alias mgBar ='multigit -Bv'