1 Matching Annotations
- Apr 2016
-
git.seveas.net git.seveas.net
-
When .git/HEAD is gone, git doesn't even think your repository is a repository. So really, we must fix this first or else we will not be able to use any git commands to salvage the rest.
After a recent power outage, a call to 'git status' returned this:
fatal: Not a git repository (or any of the parent directories): .git
When I inspected .git/HEAD, it was filled with what looked like binary code, rather than a string like:
ref: refs/heads/master
or
ref: refs/heads/develop
This:
echo 'ref: refs/heads/develop' > ./git/HEAD
did the trick!
-