A Simple Way to Rename Local and Remote Git Branchby@kodewithchirag

A Simple Way to Rename Local and Remote Git Branch

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

Git allows us to rename the git branch locally and under the remote. Renaming a local Git branch is just a matter of running a single “git branch -m” command. You can’t directly rename a remote branch as you need to push the renamed local branch to the remote repository and then delete the old branch from there. If your local branch is already pushed to a remote repository then this command will help you to rename it. If you want to check the changes then you can log in to your GitHub or GitLab portal and see the changes there.

Company Mentioned

Mention Thumbnail
featured image - A Simple Way to Rename Local and Remote Git Branch
Kode with Chirag HackerNoon profile picture

@kodewithchirag

Kode with Chirag


Receive Stories from @kodewithchirag

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa