Skip to content

Instantly share code, notes, and snippets.

@0b10011
Created August 1, 2012 16:05
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 0b10011/3228241 to your computer and use it in GitHub Desktop.
Save 0b10011/3228241 to your computer and use it in GitHub Desktop.
Rename branch locally and for origin
# Rename branch locally
git branch -m oldName newName
# Push renamed branch to origin
git push origin newName
# Remove original branch from origin
git push origin :oldName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment