Share & learn

Through Innovative Digital Library

How to rename branch in git.

I am keen to rename master branch to something else but not sure what is the command. Please assist.
 



Answers

Posted by rocky on April 8th 2018 22:45 PM

Renaming the local branch is quite easy can be done with two ways. switch to current branch and run below command ## git branch -m new_name if you want to rename other branch, please use below syntax ## git branch -m old-branch-name new-branch-name

# git branch -m master NewName

# git branch
Answer Question

Your email address will not be published. Required fields are marked *

  • Minimum 20 character
88UC

related questions

Most liked questions

Most answered questions

Login
88UC Refresh
Register
88UC Refresh
Forgot password
Ask a Question
Minimum 20 character
Minimum 20 character
Reply
Minimum 20 character
88UC Refresh