I have a git repo as my master project. It has some sub-modules added to it.
It look like:
~/super_project/ <- main git repo
~/super_project/plugins/admin <- sub-module
~/super_project/plugins/editor <- su开发者_开发问答b-module
All that's fine, its committed and working. But when I push the super project to origin/master, and then clone it down to another machine, no sub-modules get pulled.
Ive tried git submodule init
and git submodule update
and git submodule update --init
, they all have no effect.
It seems that you didn't actually pushed your submodules on your master project. Just push them.
If you clone a repository which should contain submodules but there is no .gitmodules
at the root level it means that the remote server do not have them registered.
First ensure that the submodules are pushed to the server. You need to add the submodules to the parent project (just cloning or creating a repo inside another repo isn't enough).
精彩评论