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