• Home /
  • Blog /
  • How to rename local branch in Git
Git Tutorials

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


Yaplex - Freelance developer - white logo on black background

Yaplex is a custom software development company co-founded by full-stack .NET Software developer Alex Shapovalov who lives in Mississauga, ON and provides software development services in Mississauga and GTA.

Contact Information

Mississauga, ON, Canada
Phone: +1 647 328 3809
Email: alex@yaplex.com