Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save viniciusCamargo/d6bcf4819e4e608ea80bd879402ee559 to your computer and use it in GitHub Desktop.
Save viniciusCamargo/d6bcf4819e4e608ea80bd879402ee559 to your computer and use it in GitHub Desktop.
Git: push to a different remote branch
git remote add [name-of-the-remote] [https-repository-url]
git remote set-url [name-of-the-remote] [ssh-repository-url] # avoid enter password every push
git push [name-of-the-remote] [name-of-the-local-branch]:[name-of-the-remote-branch]
Reference:
https://stackoverflow.com/a/6565661
https://stackoverflow.com/a/13897766
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment