How to Rename a Branch in Gitlab
- George Apostolov
- 05 Sep 2025
Guide
To rename the branch name (bug-A, in this example) in the CLI, run the command git branch -m and then the current name of the branch (bug-A) followed by the new name of the branch (bug-B) and click Enter.
Run command git branch.
Notice that the branch name (bug-A) has now been newly renamed (bug-B) as seen in this repository.
Create your first interactive demo in minutes
No credit card required • Start building today


