Skip to content

Instantly share code, notes, and snippets.

@milabs
Created September 6, 2013 18:12
Show Gist options
  • Save milabs/6467676 to your computer and use it in GitHub Desktop.
Save milabs/6467676 to your computer and use it in GitHub Desktop.
git - rename branch (local and remote)
#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