Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Push to a second remote
$ git remote -v
origin https://github.com/repos-a.git (fetch)
origin https://github.com/repos-a.git (push)
another https://github.com/repos-b.git (fetch)
another https://github.com/repos-b.git (push)
$ git fetch another
$ git checkout -b another/master -t another/master
# git push <remote-name> <local-branch-name>:<remote-branch-name>
$ git push another another/master:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment