git clone with submodules code example
Example 1: git load all submodules
git submodule update --init --recursive
Example 2: git clone submodule
git clone --recurse-submodules
Example 3: git clone submodules
# This will clone a repo with all submodules included
git clone --recurse-submodules https://github.com/<org>/<repo>.git
Example 4: Fetch submodules recursively
#! Fetch and update submodules into an existing project
git submodule update --init --recursive