Created
June 15, 2020 15:19
-
-
Save Kilo-Loco/f22b8da20c68f6e1f60d59f196e64140 to your computer and use it in GitHub Desktop.
How to rename master to main with Git
This file contains hidden or 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 branch -m master main | |
git push -u origin main | |
git checkout master | |
git branch -m master main | |
git fetch | |
git branch --unset-upstream | |
git branch -u origin/main | |
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main | |
git push origin --delete master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment