GitHub has changed the default branch from master to main, but repositories created before the change may still be master.
git switch them by creating the following alias and running the
alias gitswdb="git switch $(git symbolic-ref refs/remotes/origin/HEAD | cut -f4 -d'/')"
If you are using
git checkout, rewriting
checkout should work.