There's more...

When you are cloning a repository that contains one or more submodules, you need to explicitly fetch them after the clone. We can try this with our newly created submodule repository:

$ git clone super super_clone 
Cloning into 'super_clone'... 
done.

Now, initialize and update the submodules:

$ cd super_clone 
$ git submodule init 
Submodule 'lib_a' (https://github.com/PacktPublishing/Git-Version-Control-Cookbook-Second-Edition_lib_a.git) registered for path 'lib_a' 
$ git submodule update --remote 
Cloning into 'lib_a'... 
remote: Counting objects: 18, done. 
remote: Compressing objects: 100% (14/14), done. 
remote: Total 18 (delta 4), reused 17 (delta 3) 
Receiving objects: 100% (18/18), done. 
Resolving deltas: 100% (4/4), done. ...

Get Git Version Control Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.