Answers for "rename branch to main"

2

How can i rename my local master branch to main ?

$ git branch -m master main
Posted by: Guest on February-01-2021
2

rename branch to main

$ git branch -m master main

or create a new one

$ git checkout -b main
Posted by: Guest on October-03-2020
2

rename branch to main

$ git push -u origin main
Posted by: Guest on October-03-2020
1

rename branch to main

$ git push origin --delete master
Posted by: Guest on October-03-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language