commit file in submodule to main repo code example
Example 1: git checkout branch and update submodules
git checkout --recurse-submodule
Example 2: Fetch submodules recursively
#! Fetch and update submodules into an existing project
git submodule update --init --recursive