How to Change Git Branch Name

Here’s a quick reference on how you can 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.