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

前端 未结 15 893
野趣味
野趣味 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:23

    I had this issue, because .git/config contained worktree = D:/git-repositories/OldName. I just changed it into worktree = D:/git-repositories/NewName

    I discovered that, because I used git gui, which showed a more detailed error message:

提交回复
热议问题