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

How do you manage vendored or third-party code: submodule, subtree or package manager?

IntermediateProductionMonorepos, large files and repository performance
Answer

A package manager with a lockfile is the default. Submodules suit pinning a source dependency you also develop; subtree suits importing code you want to patch locally, giving contributors zero extra steps. Avoid copying code by hand because provenance is lost.

All Git & GitHub questions Roadmap: Git & GitHub

More on Monorepos, large files and repository performance