Skip to content

Instantly share code, notes, and snippets.

@weirdpattern
Created October 12, 2018 18:22
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 weirdpattern/957bf61d2b47df703881728e896530b8 to your computer and use it in GitHub Desktop.
Save weirdpattern/957bf61d2b47df703881728e896530b8 to your computer and use it in GitHub Desktop.
2018.10.12.rename-git-branch
# if you are on the same branch
git branch -m <new-name>
# if you are on a different branch
git branch -m <old-name> <new-name>
git push origin :<old-name> <new-name>
git push origin -u <new-name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment