How to Rename Your "master" Branch to "main" on GitHub
The following steps may be used to rename your "master" branch to "main" on GitHub.
Use the following commands from a command-prompt.
git checkout master
git branch -m main
git push origin -u main