I am adding a submodule to my project which contains another git repo.
To get the module I ran:
git submodule add git://github.com/biakaveron/debug-toolbar.git modules/debug-toolbar
Then ran:
git submodule update --init --recursive
Which generated this error:
fatal: Not a git repository: ../../../../../../..//d/websites/project/.git/modules/modules/debug-toolbar/modules/vendor/firephp
Failed to recurse into submodule path 'modules/debug-toolbar'
I have run into similar problems before. Previously I just added the submodule and then re-cloned the project with the recursive flag (git clone --recursive project.git) which works. However it would be easier if I could get the submodule to pull in recursively in the first place. Is there a way to do this?
One possible cause could be the fact that github.com/cadorn/firephp-libs mentions:
So you might want to update the
.gitmodulesfile ofdebug-toolbarfirst (after agit submodule update --init, without the--recursivepart), and then, try again thegit submodule update --init --recursive)The OP did:
Original answer:
It seems that the path definition for one of the submodules (in the
.gitmodulesfile) is not correct:Being a relative path, it won’t resolve successfully when cloned/updated by a
git submodule --recursivecommand done from a parent repo for which said relative path is invalid.