# How to Change Branch Name in Gitlab

> To rename a branch in GitLab, check existing repository branches using the command git branch or git branch --list, identify the current branch marked with a star icon, and enter the command git branch -m followed by the new name to officially update it.

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

## Steps

1. Check the branches you have in the repository first.
2. Type the command git branch and click Enter .
3. OR , type the command git branch --list and click Enter .
4. The one with the star icon (*) is the original branch name.
5. Type the command git branch -m , followed by the new name ( feature-B , in this example), and then click Enter .
6. Notice how the current branch name has been updated to feature-B .
7. Type the command git branch to show the new branch name officially .
