Following rajibchowdhury's answer (upvoted), use git rm
command which is advised is for removing the special entry in the index indicating a submodule (a 'folder' with a special mode 160000
).
If that special entry path isn't referenced in the .gitmodule
(like 'Classes/Support/Three20
' in the original question), then you need to remove it, in order to avoid the "No submodule mapping found in .gitmodules
for path" error message.
You can check all the entries in the index which are referencing submodules:
git ls-files --stage | grep 160000
Previous answer (November 2010)
It is possible that you haven't declared your initial submodule correctly (i.e. without any tail '/' at the end, as described in my old answer, even though your .gitmodule
has paths which looks ok in it).
This thread mentions:
do you get the same error when running 'git submodule init' from a fresh clone?
If so, you have something wrong.
If you have no submodules, delete .gitmodules
, and any references to submodules in
.git/config, and ensure the Pikimal dir does not have a .git
dir in it.
If that fixes the problem, check in and do the same on your cruise working copy.
Obviously, don't delete your main .gitmodules
file, but look after other extra .gitmodules
files in your working tree.
Still in the topic of "incorrect submodule initialization", Jefromi mentions submodules which actually are gitlinks.
See How to track untracked content? in order to convert such a directory to a real submodule.
.git
folder. Doing agrep -r "Classes/Support/Three20" *.*
doesn't yield any results either – Ben Scheirman Nov 16 '10 at 4:36git ls-tree HEAD Classes/Support
, and if it says Three20 is a commit, there's a gitlink there. If there is, follow the appropriate instructions from the question VonC linked above to either turn it into a proper submodule or turn it into regularly tracked content. – Cascabel Nov 16 '10 at 4:44