change from master to main github code example
Example 1: change master to main git
$ git branch -m master main
Example 2: Update master to main github
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a