Skip to content

Instantly share code, notes, and snippets.

@armanm
Created August 9, 2013 03:56
Show Gist options
  • Save armanm/6191082 to your computer and use it in GitHub Desktop.
Save armanm/6191082 to your computer and use it in GitHub Desktop.

How to rename local git branches

rename local branch

git branch -m old-branch-name new-branch-name

delete remote branch with old name

git push origin :old-branch-name

create remote renamed branch

git push origin new-branch-name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment