git rename branch master to main code example
Example 1: git rename master to main
$ git branch -m master main
Example 2: rename branch to main
$ git push -u origin main
$ git branch -m master main
$ git push -u origin main