Rename a local git branch
Ever wanted to rename a local git branch? The git branch -m
command is your friend
Want to rename a branch that's not currently checked out?
git branch -m <original_name> <new_name>
Or to rename your current local branch, you can exclude the original name in the git branch args:
git branch -m <new_name>
Tweet