How to Rename a Branch in Gitlab
- George Apostolov
How to Rename a Branch in Gitlab: step-by-step 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.
Quick answer: To rename a branch in GitLab, run the git branch -m command in the CLI with your current branch name followed by the new name, then run git branch to verify the update.
About this GitLab tutorial
Quickly update and verify your branch names in GitLab using simple CLI commands. This guide shows how to rename a Branch in Gitlab in 3 steps, starting with "To rename the branch name (bug-A, in this example) in the CLI, run the command git bran..." and finishing with "Notice that the branch name (bug-A) has now been newly renamed (bug-B) as seen in this...". The interactive demo above is a click-through copy of the real GitLab interface, so you can rehearse each step before doing it in your own account.
Frequently asked questions
How many steps does it take to rename a Branch in Gitlab?
3 steps. Each one is listed in order above, and the demo highlights exactly where to click.
Can I try it without changing my own account?
Yes. Clicking through the demo doesn't touch your GitLab data or settings. Once you know the flow, repeat it in your own workspace.
This tutorial is filed under GitLab. Related guides: How to resolve merge conflicts in gitlab, How to setup gitlab and How to Sync GitLab Snippet Comments to Slack Using Zapier. Last reviewed 05 Oct 2026.
Create your first interactive demo in minutes
No credit card required • Start building today





