How to rename local branch in Git

If you want to rename local git branch you can do it using the following command

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

If you want to rename your current git branch you don't need to provide old branch name

git branch -m new-branch-name

how to rename git branch


Social media


Latest Tweets