This morning my Windows 10 crashed and rebooted once I lifted my laptop's screen. No special activity was progressing, so I don't think there was significant disk activity.
However one of my main Git repos crashed after that reset. Here is what I tried:
$ git status
fatal: Not a git repository (or any of the parent directories): .git$ git init
Reinitialized existing Git repository in ....../.git/$ git status
fatal: Not a git repository (or any of the parent directories): .git- Loop
I don't think I have unpushed commits, so wiping and cloning from remote should work.
Still, can I ask what to do to recover an existing Git repository (.git
directory still exists, chkdsk
reports OK) in such cases?
[Add] read this but did not apply to my case (I can't restore the repo)