I have been working on the same local repository, cloned from remote origin, for several months. When I booted today, despite not changing anything, the repo is no longer being recognized by git. Attempting to run any git command anywhere in the repo gives this error:
fatal: Not a git repository (or any of the parent directories): .git
The .git directory still exists and looks valid at a glance, although I'm not really sure what I'm looking for in there.
I have made certain that:
- I am running the commands in the right place.
- The repo is initialized.
The first thing I did after I started getting these errors was to try and run git init in the repo root to reinitialize. When I do this, I get a message indicating that it was reinitialized successfully, but the repo is still not treated as such by git; I continue to get the error above.
A lot of in-progress local work remains in that repo and I would really rather not start from scratch on a fresh clone. What can I else can I do to fix this?
Edit: This is git running in Cygwin on Windows 10, if it matters.