# How to Rename a Branch in Gitlab

> 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.

Canonical: https://livedemo.ai/tutorials/how-to-rename-a-branch-in-gitlab/
Apps: GitLab
Updated: 2026-10-05
Interactive demo: https://story-api.livedemo.ai/workspaces/62255d3d3304f17b8f5e2d03/stories/692a4c4cab56e05a00ff7be0/preview?step=1

## Steps

1. 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 .
2. Run command git branch .
3. Notice that the branch name (bug-A) has now been newly renamed (bug-B) as seen in this repository.
