Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duartealexf/22b418c18130e1ab2aa216e1d2335039 to your computer and use it in GitHub Desktop.
Save duartealexf/22b418c18130e1ab2aa216e1d2335039 to your computer and use it in GitHub Desktop.
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