master to main code example
Example 1: rename branch to main
$ git branch -m master main
or create a new one
$ git checkout -b main
Example 2: rename branch to main
$ git push origin --delete master
Example 3: convert master to main
git branch -m main