Quickly rename a git branch
Sometimes you make an error on your branch and see it after some commit. Don't panic, here how you can rename a branch :
git branch -m [oldName] [newName]
Also, did you already push the update on a distant server ? Just delete and repush the branch :
git push original :[oldName]
git push origin [newName]
That's it !
Written by Thibault Milan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#