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

前端 未结 13 1967
星月不相逢
星月不相逢 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:25

    I know this is an old thread, but I just had the same problem and ended up solving in a different way. The git init didin't work for me. Posting here, in case it's useful to anyone else.

    My repository has two submodules. After rebasing I started getting the error fatal: git status --porcelain failed.

    The solution was to verify the property worktree in every submodule config file - e.g. /.git/modules//config.

    I had one invalid path for the worktree property. It was linking to an unexisting folder that was changed and merged to master - probably due an error resolving conflicts.

提交回复
热议问题