- You create a new, empty repository.
- Then, you work on some branch other than master, without ever creating master.
...you get a warning on git clone:
warning: remote HEAD refers to nonexistent ref, unable to checkout
To fix this, point the symbolic-ref HEAD at refs/heads/<default-branch> after installing commit hooks.
This fixes the warning, and also means that git clone will check out the repository default branch by default, which is nice.
There are a few caveats about this behavior (see T5963 for discussion) but nothing too substantial.
The only real issue is that Git prevents deletion of the default branch without a config setting. Just set that settting.