Skip to content

Instantly share code, notes, and snippets.

@hbasria
Created October 21, 2016 08:05
Show Gist options
  • Save hbasria/5a847f687af2f3fdc66ebc511e0f8860 to your computer and use it in GitHub Desktop.
Save hbasria/5a847f687af2f3fdc66ebc511e0f8860 to your computer and use it in GitHub Desktop.
rename git branch
1. switch to branch which needs to be renamed
2. git branch -m <new_name>
3. git push origin :<old_name>
4. git push origin <new_name>:refs/heads/<new_name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment