No submodule mapping found in .gitmodule for a path that's not a submodule

Ben Scheirman picture Ben Scheirman · Nov 15, 2010 · Viewed 266.8k times · Source

I have a project that has a submodule at lib/three20

My .gitmodule file looks like this:

[submodule "lib/three20"]
    path = lib/three20
    url = git://github.com/facebook/three20.git

I have cloned this in the past without errors, (git submodule init followed by a git submodule update) and it's been working for a while.

I tried to clone this to a new machine, and now I'm getting this error on git submodule init:

No submodule mapping found in .gitmodules for path 'Classes/Support/Three20'

That path is just an empty folder in Xcode that I use to house the projects from the other directory. It's not part of the .gitmodules file, so I don't see where it's getting this path from.

Any ideas?

Answer

rajibchowdhury picture rajibchowdhury · Nov 15, 2012

No submodule mapping found in .gitmodules for path 'OtherLibrary/MKStore' when

$ git submodule update --init

I didn't know why the error occur. After spending a minute and found the answer in stackoverflow.

$ git rm --cached OtherLibrary/MKStore

and then update the submodule again. It's working fine.

http://en.saturngod.net/no-submodule-mapping-found-in-gitmodules