• 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 located in Mississauga, Ontario. Yaplex was founded in 2013 and provides website development, mobile development, and custom .NET software development services.

Contact Information

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