Skip to content

Instantly share code, notes, and snippets.

@ohxyz
Last active January 22, 2018 04:32
Show Gist options
  • Save ohxyz/8bcd61ca778b1630b4c19a411faf2d2a to your computer and use it in GitHub Desktop.
Save ohxyz/8bcd61ca778b1630b4c19a411faf2d2a to your computer and use it in GitHub Desktop.
Rename a branch locally and remotely
git branch -m old-name new-name
git push origin -u new-name
git push origin :old-name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment