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

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

    Usually, git creates a hidden directory in project's root directory (.git/)

    When you're working on a CMS, its possible you install modules/plugins carrying .git/ directory with git's metadata for the specific module/plugin

    If you do not want to use git's submodules feature, quickest solution delete all .git directories except root git metadata directory. If you do so, git will not consider those modules as project submodules.

    cd /path/to/your/project/code
    find ./ | grep ".git/index"
    

    Once located delete ".git" all directories except the root one, but if you deleted it initialize your repo again

提交回复
热议问题