I was managing a git repo, as I have done thousands of times in the past, using gitg. Suddenly, the app crashed (Segmentation fault (core dumped)) and the repo got corrupted. Now git status says
No commits yet
The files seem to be with the same content as the last commit I made before this got corrupted, so I could start over from here, but all the history would be lost. If I run git branch I get
fatal: Failed to resolve HEAD as a valid ref.
I have no idea how to further diagnose what is going on, nor solve it. Any help is very appreciated.