Submodule versus subtree merging

There is no easy answer to the question of whether or not to use submodules or subtree merging for a project. When choosing submodule, a lot of extra pressure is put on the developers working on the project as they need to make sure they keep the submodule and the super project in sync. When choosing to add a project by subtree merging, no or little extra complexity is added for developers. The repository maintainer, however, needs to make sure the subproject is up to date and that commits are added back to the subproject. Both methods work and are in use, and it is probably just a matter of getting used to either method before finding it natural to use. A completely different solution is to use the build system ...

Get Git: Mastering Version Control now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.