🍀 Rename local branch in GIT

April 4, 2020 (4y ago)

There are two possible states you can be when you might want to rename local branch in git.

When you want to rename current branch:

🖥️

git branch -m [newname]

When you want to rename other branches than your current branch:

🖥️

git branch -m [oldname] [newname]