Created
November 22, 2019 13:05
-
-
Save DimaSamodurov/cb60f37ba669946941cb9cc5f3fe29c3 to your computer and use it in GitHub Desktop.
How to rename to master branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout master2 | |
# delete local master | |
git branch -D master | |
# rename master2 to master | |
git branch -m master2 master | |
# Push master with force option to overwrite existing remote branch. | |
git push --set-upstream -f origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment