Head over to your repo <ORGorUSER>/<REPO>
and rename the default branch to main
(this guide assumes, that previously, it was master
).
https://github.com///settings/branches
Now, you have to locally set your HEAD
to the newly renamed main
(default) branch and get rid of your local master
branch.
$> git fetch && git checkout main && git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main && git branch --delete master
Based on the official GitHub info and this lovely guide