vanutsteen.nl => nerds only A blog on rails, php, computing, my bass guitar and stuff

pushing all git remote repositories

on in Development, Linux

I’m now working on a project that is hosted on github AND rubyforge. And lazy as I am, I don’t want to do:

1
2
git push origin
git push rubyforge

That’s why I create a handy shortcut for it and placed it in my ~/.bashrc:

1
2
3
4
5
function git-push-all() {
for remote in `git remote`; do
git push $remote
done
}

What it does: it lists all remote repositories linked to that git project and pushes them all. Usage:

1
git-push-all

Don’t get confused with “git-push –all”! That’s something completely different!

Comments