Difference between subprojects and submodules in Git?

In Git, is there a difference between a “submodule” (created and managed by the git subodule command) and a “subproject” (literally just one git repository that you put in another), and if so, what is it?

All the documentation that I could find is rather ambiguous (and in some cases contradictory). My suspicion is that there is no difference, but I suggest that I have to confirm this and leave a question for git newbies to find.

+46
git
Aug 19 '11 at 16:17
source share
1 answer

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

  • Submodules provide semi-fixed references from a superproject to subprojects and are integrated into git. It is best used when a subproject is:
    • developed by someone else, is not under the administrative control of a super project, and follows a different release cycle.
    • contains code shared between superprojects (especially when the intention is to distribute corrections and new features back to other superprojects).
    • Shares huge and / or many files that can damage the performance of daily git commands.
  • Subelements forces the subproject repository to be imported into the superproject repository as part of the original repository with a complete history, usually in a particular subproject's subdirectory.
  • Wrappers , which provide multi-repository management features to a superproject with related subprojects.

Reference documentation

+64
Aug 19 '11 at 16:28
source share



All Articles