Git master main
Rename to main
git branch -m main
push to origin
git push origin -u main
Update config
git config --global init.defaultBranch main
delete master
git branch -d master
git branch -m main
push to origin
git push origin -u main
git config --global init.defaultBranch main
git branch -d master