rename master to main github code example
Example 1: git rename master to main
$ git branch -m master main
Example 2: change master to main git
$ git branch -m master main
Example 3: rename branch to main
$ git branch -m master main
or create a new one
$ git checkout -b main
Example 4: rename branch to main
$ git push -u origin main
Example 5: rename branch to main
$ git push origin --delete master
Example 6: rename master to main
// must already have added somethign to HEAD
$ git branch -m master main