Git Error “fatal: invalid branch name: init.defaultBranch =”

It would appear that you have experimented with the new (2.28) init.defaultBranch configuration value.

Assign it a proper value:

git config --global init.defaultBranch main

Leave a Comment