Rename Local Branch in GIT


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>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: