> For that reason I always use a git config variable to reference such branches. In my global git config it's main

    $(git config user.primaryBranch)
What about using git's own `init.defaultBranch`?

I mean, while useless in terms of `git init` because the repo's already init'd, this works:

    git config --local init.defaultBranch main
And if you have `init.defaultBranch` set up already globally for `git init` then it all just works

Hmm that might be nice actually. I like not conflating those two things, but as you say if the repo is already init'd then there's no chance it'll be used for the wrong purpose.

In any case the main thrust was just to avoid embeddings assumptions about branch names in your scripts :)