Submodules need to be registered in 3 places. Ensure that these are properly set up:
.gitmodules
file has an entry.git/config
has an entrygit ls-tree sha1
of the tree where the submodule is corresponds to a commit in the submodule
Question
I'm using git + pathogen to track my vim plugins. I have a git repo in my .vim folder, and all my plugins are in the bundle
folder.
To add a new plugin I do:
git submodules add git://github.com/plugin.git bundle/plugin
It works out of the box for most plugins (it clones the new repo to the location specified and I'm happy with my vim).
With some repos, however, it simply does not work. By not working I mean:
git submodules add
it doesn't output anything (unlike the clone information).bundle/plugin
I was told I should run git submodule init && git submodule update
after adding a new submodule.
Is it possible that forgetting to do so may have caused the issues?
Solution
Submodules need to be registered in 3 places. Ensure that these are properly set up:
.gitmodules
file has an entry.git/config
has an entrygit ls-tree sha1
of the tree where the submodule is corresponds to a commit in the submodule