fatal: Invalid branch name: 'HEAD' code example
Example: error: refname refs/heads/master not found
error: refname refs/heads/HEAD not found
fatal: Branch rename failed
$ git checkout -b main
error: refname refs/heads/HEAD not found
fatal: Branch rename failed
$ git checkout -b main