Why do I get “fatal: git status --porcelain failed”?

前端 未结 13 1970
星月不相逢
星月不相逢 2020-12-09 07:39

This is a huge pain in the bum. I\'ve got this a few times before and I don\'t understand why. 5 mins ago the repo was fine and working, I move some files around (which is a

13条回答
  •  长情又很酷
    2020-12-09 08:20

    .git is a file in submodules and points to a directory located in your root .git directory.

    In my case, I was mounting a git directory in docker and checking status there. The .git file of this submodule contained an absolute path which was invalid in docker. I edited this .git file to change the gitdir path to a relative path.

    Git version: 2.7.4

提交回复
热议问题