On Fri, Jun 26, 2020 at 10:33:14PM +0100, Philip Oakley wrote: > A wild bikeshed question: Is HEAD itself protected as a branch name e.g. > that HEAD could contain `ref: HEAD` or `ref: refs/heads/HEAD`? (or maybe > the null oid The first is not legal; we insist that symrefs start with "refs/". The second one _is_ legal, but isn't any kind of loop. The HEAD symref is .git/HEAD, which is distinct from a ref of the same name inside refs/heads/. It's confusing, of course, because the lookup rules make it hard to refer to refs/heads/HEAD. For that reason we do disallow it from the branch-creation porcelains like git-branch and git-checkout. -Peff