Choose default branch name for new repos.
Section: Identity and UX Defaults
Set init.defaultBranch
bash
bash
git config --global init.defaultBranch mainLearn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Identity and UX Defaults