NOTE: Read https://github.com/github/renaming before proceeding
Rename local branch to main
git branch -m master main
Check current branch name
git status
On branch main
Your branch is up to date with 'origin/master'.
Change GitHub default branch to main
- Click on
Settings -> Branches
orhttps://github.com/[USERNAME]/[REPO]/settings/branches
- On
Default branch
, switch tomain
and clickupdate
Delete remote branch
git push origin --delete master