Pushing all Git branches

To push all your branches, use either (replace REMOTE with the name of the remote, for example "origin"):

git push REMOTE '*:*'  

Or

git push REMOTE --all  

However --all only works with branches checked out so will require preceeding with:

for remote in `git branch -r | grep -v master `; do git checkout --track $remote ; done  

Tags are pushed separately:

git push REMOTE --tags  

more here.

Show Comments