For me, everything was working well for months until today morning. All git commands return "fatal : not a git repository". I also work with other git repositories and all have the same problem.
At my work, I am working on a network disk mounted on my machine. Thus all local copies of my git repos (directory where I git clone) are on this network disk. While investigating, I discovered touch tmp
gave me an error "Read-only File system" that helped me understand the source of the problem.
For any reason (issue at mounting the disk today?), the file system was mounted read-only (you probably know that when mount with rw fails it is mounted ro...).
Finally remounting the disk with mount -o remount,rw /path-to-workdir/
solved my problem.
So my humble advice - in addition to other great suggestions - is to check also for the write access to the .git directory (either mount access, or user permissions).
Hope it helps!