Created
November 28, 2018 10:30
-
-
Save josemarcosrf/9d7f29c2388f6202ff1a450dafda97ec to your computer and use it in GitHub Desktop.
Rename git branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from the branch to rename | |
git branch -m new-name | |
# delete the old name-branch and push the new one | |
git push origin :old-name new-name | |
# reset the upstream with the new local name one | |
git push origin -u new-name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment