clone repo with submodules with different branch code example
Example 1: git pull with submodules
git pull --recurse-submodules
Example 2: Fetch submodules recursively
#! Fetch and update submodules into an existing project
git submodule update --init --recursive