I\'m trying to put a submodule into a repo. The problem is that when I clone the parent repo, the submodule folder is entirely empty.
Is there any way to make it so
You can use the --recursive
flag when cloning a repository. This parameter forces git to clone all defined submodules in the repository.
git clone --recursive git@repo.org:your_repo.git
After cloning, sometimes submodules branches may be changed, so run this command after it:
git submodule foreach "git checkout master"