Cannot remove submodule from Git repo

This question already has an answer here:

  • How do I remove a submodule? 21 answers

  • If the git submodule deinit fails (maybe because the .gitmodules doesn't list that submodule), try to remove at least the special entry in the index:

    git rm --cached submodule-name
    git commit -m "Remove submodule entry"
    git push
    

    The gray folder should then be gone on GitHub side.


    这工作https://stackoverflow.com/a/1789374/1798394:

    git rm --cached path/to/submodule
    rm -rf path/to/submodule
    
    链接地址: http://www.djcxy.com/p/16446.html

    上一篇: .gitmodule中找不到子模块的路径没有找到子模块映射

    下一篇: 无法从Git仓库中删除子模块