How to rename a local Git branch

January 22, 2019

People change their minds about branch names all the time. Thankfully git allows quick and easy renaming of branches. Here are a few ways to rename a local Git branch.

If currently on the branch:

git branch -m <NEW_BRANCH_NAME>

If not currently on the branch:

// Method #1

// Method #2
git checkout <CURRENT_BRANCH_NAME>
git branch -m <NEW_BRANCH_NAME>