Given the case you have an amount of quite similar projects (similar structure, same branching model, ...) and you want to do an git operation on each repository like switching the branch for example.
Currently you have two options: First one: cd in each repository, run git checkout nice-branch. That's ok if you have 2 repos, but then you won't use mgpm. If you use mgpm, you probably have about 40 repositories and then it won't make much fun doing it that way.
Second option is:
$ find . -maxdepth 1 -type d -not -path . -exec git --git-dir={}/.git --work-tree=$PWD/{} checkout nice-branch \;
which is hard to remember, much stuff to type, ugly and so on ...
Well, it would be really awesome if mgpm supports a batch mode, which allows the user to run git commands on each repository, which is managed by mgpm, just like the following example (-e is for execute):
$ mgpm -e 'checkout nice-branch'
This would enter each repository and run git checkout nice-branch in each of 'em.
Or maybe you want to do a simple commit on each repo after a small change and tag it, push it (pump it, rock it, groove it, move it ... :D). therefore chaining would be nice:
$ mgpm -e "commit -am 'Added /target to .gitignore'" -e "tag 2.5.19" -e 'push' -e 'push origin 2.5.19'
This would enter each repository and run each of the given git commands in the specified order.
What do you think?
Given the case you have an amount of quite similar projects (similar structure, same branching model, ...) and you want to do an git operation on each repository like switching the branch for example.
Currently you have two options: First one:
cdin each repository, rungit checkout nice-branch. That's ok if you have 2 repos, but then you won't use mgpm. If you use mgpm, you probably have about 40 repositories and then it won't make much fun doing it that way.Second option is:
which is hard to remember, much stuff to type, ugly and so on ...
Well, it would be really awesome if mgpm supports a batch mode, which allows the user to run git commands on each repository, which is managed by mgpm, just like the following example (
-eis for execute):$ mgpm -e 'checkout nice-branch'This would enter each repository and run
git checkout nice-branchin each of 'em.Or maybe you want to do a simple commit on each repo after a small change and tag it, push it (pump it, rock it, groove it, move it ... :D). therefore chaining would be nice:
This would enter each repository and run each of the given git commands in the specified order.
What do you think?