This interactive demo was created free with Storylane in 2 minutes. Create your own demo
This interactive demo was created free with Storylane in 2 minutes. Create your own demo
Start free
All Tutorials /Gitlab

How to Change Branch Name in Gitlab

Updated on:
May 12, 2026
By:
Madhav Bhandari
Use this interactive demo to learn how to rename a Git branch directly in GitLab.

Quick summary

Renaming a Git branch in GitLab requires a few simple terminal commands that let you update the branch name locally without losing any history or work.


Steps

  1. Check the existing branches in your repository before making any changes.
  2. Type the command git branch and press Enter to list all local branches.
  3. Alternatively, type git branch --list and press Enter to display all branches.
  4. Identify the current branch by looking for the entry marked with a star icon (*).
  5. Type the command git branch -m followed by the new branch name (for example, feature-B) and press Enter.
  6. Confirm the branch name has been updated by checking the terminal prompt, which now reflects the new name.
  7. Type git branch again and press Enter to officially verify the new branch name is active.

📌 Why this matters

Knowing how to rename a Git branch in GitLab is an essential skill for developers managing version control workflows. Incorrect or outdated branch names can cause confusion in collaborative projects, making accurate branch naming critical for team productivity. The git branch -m command lets you rename any local branch instantly without disrupting existing commits or history. Mastering this GitLab branch management task helps teams maintain clean, consistent repository structures at scale.
Your product deserves an interactive demo
Start free
Similar Articles
Gitlab

How to Integrate Replit with GitLab

Madhav Bhandari
Director of Marketing @ Storylane
Gitlab

How to Create a Pull Request in GitLab

Madhav Bhandari
Director of Marketing @ Storylane
Gitlab

How to Integrate Snyk with GitLab

Madhav Bhandari
Director of Marketing @ Storylane
No items found.
Platform
Interactive Demos
Sandbox Demos
Buyer Hub
RepX
Integrations
Solutions
Product Marketers
Growth & Demand Gen
Sales Reps & AEs
Presales & SEs
Customer Success
Product Managers
Customers
Demo Showcase
Customer Stories
Finer Demos Club
Features
Demo Signals
Personalization
Deal Intelligence
Resources
Blog
The Plot
Tutorials
Events & webinars
Help Docs
What’s New
Demo Dundies
Company
Careers
Pricing
Partners
Contact
Trust Center
Backed by
Chrome Extension Icon
Chrome extension
Download
Desktop app
Download
Built in San Francisco Bay Area - ©2026 Storylane
Privacy PolicyTerms & Conditions
X Corp (formerly Twitter)LinkedIn
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it