Difference between subprojects and submodules in Git?

A subproject is a generic term for one of three types of nesting:

  • Submodules provide semi-fixed references from the superproject into subprojects and are integrated into git. It is best used when the subproject:
    • is developed by someone else, is not under the administrative control of the superproject and follows a different release cycle.
    • contains code shared between superprojects (especially when the intention is to propagate bugfixes and new features back to other superprojects).
    • separates huge and/or many files that would hurt performance of everyday git commands.
  • Subtrees causes the subproject repository to be imported into the superproject’s repository to be a native part of the repository with full history, typically in a specific subdirectory of the superproject.
  • Wrappers, which provide multi-repository management functionality to a superproject with associated subprojects.

Reference documentation

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)