How to “resolve fatal: Not a git repository”?

后端 未结 5 1260
醉梦人生
醉梦人生 2021-02-01 13:53

I was trying to remove one sub-module from the project

Tried rm -rf .git/modules/submodulePath

After that I am having the issue

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-01 14:31

    I ran into this and didn't have a .git/modules directory in my main repository. I have one submodule 'build', so just removed any references and reinitialized it:

    rm -rf .git/modules
    rm -rf build
    git submodule init
    git submodule update
    

提交回复
热议问题