Having an invalid HEAD file causes git not to recognize the repository and will cause an invalid message "fatal: Not a git repository (or any of the parent directories): .git" although there is a .git folder and everything seems okay in it. Solution was just to change HEAD to a valid ref/hash. I ran into this problem when I had a BSOD during a rebase (ignore that I'm having to use Windows). This meant that only half of the hash got written into HEAD and all git commands I tried failed. Not sure whether it's useful to add a better message for this case, but at least if somebody stumbles on it again, maybe they can find this text. + egon -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html