git rename local branch

If you want to rename a branch while pointed to any branch, simply do :
git branch -m oldname newname

If you want to rename the current branch, you can simply do:

git branch -m newname

Leave a Reply