How can I detect if the current HEAD is an unborn branch?
"git rev-parse HEAD --" outputs
fatal: bad revision 'HEAD'
But git also outputs this for all other inputs like "git rev-parse noHEAD --".
"git branch" returns an empty output.
Do I have to read .git/HEAD and check if the contents start with "ref: " and the reference does not exist?