How to Change Branch Name in Gitlab



Guide

  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.

🚀

Create your first interactive demo in minutes

No credit card required • Start building today

Start free

    This website uses cookies to enhance the user experience.

    AcceptDecline