Interview Prep/Git & GitHub/Monorepos, large files and repository performance

How do you operate submodules safely in CI/CD?

AdvancedProductionMonorepos, large files and repository performance
Answer

Pin them to commits and bump through reviewed PRs, check out with submodules: recursive and a token that can read them, verify submodule commits are reachable on the remote before merging (git push --recurse-submodules=check), and run a CI check that the recorded SHA exists on its upstream branch.

git submodule status --recursive
git submodule update --init --depth 1 --recursive
All Git & GitHub questions Roadmap: Git & GitHub

More on Monorepos, large files and repository performance