Git Submodules and Subtrees: Bringing Another Repo into Your Project, and Monorepo or Polyrepo?
A submodule stores no files in the superproject, only a commit hash (a gitlink), which is why cloning needs --recurse-submodules and updating means committing the pointer. We attach Bookstore's shared contract repo as a submodule and as a subtree, and compare the CI setup, sharing as a package and the monorepo decision.
15 Nov 2026
·
11 min
·
9