No submodule mapping found in .gitmodules for path

前端 未结 2 1743
独厮守ぢ
独厮守ぢ 2020-12-13 02:18

When I run

git submodule update
No submodule mapping found in .gitmodules for path \'Classes/lib/AFKissXMLRequestOperation\'

But I have no

相关标签:
2条回答
  • 2020-12-13 02:53

    Just leaving this here for anyone using git on Windows. It is possible to follow all of the answers online and still have it not work due to git's handling of path separators. E.g.:

    My problem case was adding hugo themes via submodule:

    git submodule add https://github.com/danielkvist/hugo-terrassa-theme.git themes\terrassa

    will result in a .gitmodules like:

    [submodule "themes\\terrassa"]
        path = themes\\terrassa
        url = https://github.com/danielkvist/hugo-terrassa-theme.git
    

    Which will cause problems for git submodule [status || init || ...]

    Manually replacing the separators to:

    [submodule "themes/terrassa"]
        path = themes/terrassa
        url = https://github.com/danielkvist/hugo-terrassa-theme.git
    

    ...solved it for me.

    Also solved the deployment on Netlify since they use *nix server images.

    0 讨论(0)
  • 2020-12-13 02:58

    check that you have the proper setting in .git/modules as well. Since a few versions ago, git adds an entry there.

    Also, the tree probably has a commit object at that path. To get rid of it you can

    git rm --cached Classes/lib/AFKissXMLRequestOperation
    

    that should get rid of it once and for all.

    0 讨论(0)
提交回复
热议问题