Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default branch from master to main #66

Closed
crowesn opened this issue Jul 14, 2020 · 2 comments
Closed

Change default branch from master to main #66

crowesn opened this issue Jul 14, 2020 · 2 comments

Comments

@crowesn
Copy link
Contributor

crowesn commented Jul 14, 2020

https://www.hanselman.com/blog/EasilyRenameYourGitDefaultBranchFromMasterToMain.aspx

@scherztc
Copy link
Contributor

scherztc commented Jan 11, 2021

  • Move master to main.

  • Push main.

  • change my default branch in my GitHub settings

  • Make new main branch rule

  • Remove master

@scherztc
Copy link
Contributor

Locally you might need to update:

$ git checkout main
$ git fetch
$ git branch --unset-upstream
$ git branch -u origin/main
$ git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants