git init default branch main code example Example: set default branch to main on git init $ git config --global init.defaultBranch main