git status returns fatal: Not a git repository but .git exists and HEAD has proper permissions

后端 未结 8 726
无人及你
无人及你 2020-12-02 12:24

When I run git status on my repo I get fatal: Not a git repository: /my repo/.git/modules/docs

I\'ve checked and .git exists and contains HEAD with the

8条回答
  •  失恋的感觉
    2020-12-02 12:24

    I finally sorted out that the issue was due to an issue with one of the submodules. Simply renaming the repo directory caused a conflict with that submodule. After seeing the discussion in How can I rename a git repository with submodules? I realized that cloning the repo is a better way to go instead of renaming the directory and that solved the issue with the submodule.

提交回复
热议问题