how to change main branch name code example
Example 1: rename branch to main
$ git branch -m master main
or create a new one
$ git checkout -b main
Example 2: git change branch name
git branch –m old-name new-name
$ git branch -m master main
or create a new one
$ git checkout -b main
git branch –m old-name new-name