Empty Git submodule folder when repo cloning

I have one repo hosted at https://github.com/aikiframework/json . In my local copy, I added a submodule using the command

git submodule add git@github.com:jcubic/json-rpc.git json-rpc 

Then I made a commit and clicked, and the changes will appear on GitHub (I can click on it). But when I clone a repo

 git clone https://github.com/aikiframework/json.git 

json-rpc submodule folder is empty.

What am I missing here? Did I forget something? Why is this folder empty?

+74
git version-control git-clone git-submodules
Jul 06 2018-12-12T00:
source share
1 answer

OK I found it to add --recursive when cloning a repo.

So, the clone command ends as:

 git clone https://github.com/aikiframework/json.git --recursive 
+128
Jul 06 2018-12-06T00:
source share



All Articles