why git rename master to main code example Example: git rename master to main $ git branch -m master main