clarkk
clarkk

Reputation: 1

How to add git submodule with nested submodules?

How to add a submodule with nested submodules?

When I do the following only the root submodule is added. How to add all submodules in the submodule recursively?

git submodule add https://the-submodule.git path/to/submodule

In the above submodule there is a nested submodule and the folder is not even created after cloning

path/to/submodule                   <- root submodule
path/to/submodule/nested-submodule  <- nested submodule (folder not even created)

The main project is on github and the submodule is gitlab (with including nested submodules)

Upvotes: 0

Views: 1090

Answers (1)

&#212;rel
&#212;rel

Reputation: 7642

After cloning you have to init recursively with

git submodule update --init --recursive

This will do what you want

Upvotes: 3

Related Questions