git branch "-M" main code example
Example 1: rename branch to main
$ git push -u origin main
Example 2: git branch command
git branch <branchname>
(or)
git checkout -b <branchname>
$ git push -u origin main
git branch <branchname>
(or)
git checkout -b <branchname>