Ya' row ze: Lets go!

You are here

updating all Git branches on a fork or other remote

If you have multiple remotes and want to keep them all up to date with a single master remote, you can do this in two commands:

git remote update
git push [TARGETREMOTE] refs/remotes/[SOURCEREMOTENAME]/*:refs/heads/*
git push [TARGETREMOTE] --tags

This is helpful if you have a fork of one repo and don't want to checkout/pull/merge all the origin branches, and then push them to the target.

Back to top