git update submodule to certain branch code example Example: git checkout branch and update submodules git checkout --recurse-submodule