Définissez la branche par défaut sur main sur git init

$ git config --global init.defaultBranch main
Gifted Gorilla