I deal with the main/master brouhaha by using a script I wrote that determines the name of the appropriate branch:
#!/bin/bash
git remote show origin | sed -n '/^ *HEAD branch: */s///p'
It's in my `$HOME/bin` as `git-master`, symlinked as `git-main`. git switch $(git master)
(`git foo` finds and executes a `git-foo` command anywhere in $PATH, a handy feature if you want to implement your own extensions.)(This is of course irrelevant to the topic of the top-level post.)