How to Change Git Branch Name

A quick one. Here’s how to change your git branch name:

If you want to rename of your current local branch:

git branch -m new-branch-name

If you want to change the name of a different local branch

git branch -m old-branch new-branch-name

That’s it. Bye.