Just installed git on Windows. I set the GIT_DIR variable to be c:\\git\\ and verified that this environment variable is maintained by cygwin (i.e. echo $GIT_DIR is what it
In my case, I was in the same folder as ".git" file for my repo. I had to go one directory level up, it solved it.
If an existing (non-bare) checkout begins giving this error, check your .git/config file; if core.bare
is true, remove that config line
Same issue i got, i did following steps,
then it work starts working.