Skip to content

Instantly share code, notes, and snippets.

@rana01645
Created October 4, 2020 02:49
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 rana01645/80e79abc355e4e25c2af71ac52c0f51d to your computer and use it in GitHub Desktop.
Save rana01645/80e79abc355e4e25c2af71ac52c0f51d to your computer and use it in GitHub Desktop.
Rename branch git
# checkout to old_named branch
git checkout <old_name>
# create new named branch
git branch -m <new_name>
# push new named branch to remote
git push origin -u <new_name>
# delete old named branch
git push origin --delete <old_name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment