---
title: "Discussion on \"How to rename git branch\" | Hashnode"
description: "Discussion on \"How to rename git branch\". # How to rename local git branch\ngit branch -m newBranchName\n\n# If the old branch name has alrady been pushed to remote, \n# you'd need to do a bit of cleanup.\n\n# To list all your branches:\ngit branch -a"
url: "https://hashnode.com/posts/how-to-rename-git-branch/66398d7a4512fb33a983be26"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to rename git branch](https://blog.brightscripters.com/how-to-rename-git-branch?utm_source=hashnode&utm_medium=feed)

\# How to rename local git branch git branch -m newBranchName # If the old branch name has alrady been pushed to remote, # you'd need to do a bit of cleanup. # To list all your branches: git branch -a

May 7, 2024 · 1 min read · blog.brightscripters.com  
Read the article

-   [#git](https://hashnode.com/tag/git)

## Written by

[Bright Scripters](https://hashnode.com/@BrightScripters)

@BrightScripters · USA

  
[View profile](https://hashnode.com/@BrightScripters)

Taking BrightSign programming to the next level

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
