Why am I getting the message, “fatal: This operation must be run in a work tree?”

前端 未结 15 916
野趣味
野趣味 2020-11-27 12:33

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

15条回答
  •  被撕碎了的回忆
    2020-11-27 13:09

    Just in case what happened to me is happening to somebody else, I need to say this: I was in my .git directory within my project when I was getting this error. I searched and scoured for answers, but nothing worked. All I had to do was get back to the right directory. It was kind of a face-palm moment for me. In case there's anyone else out there as silly as me, I hope you found this answer helpful.

提交回复
热议问题