About
How to integrate subproject into a main project. (ie code dependency)
Option
Submodule
sub-module creates a link to a repository (no file, no commit, no history is saved within the main project repository)
Subtree
sub-tree integrates a subprojects repository within a subdirectory, optionally including the subproject’s entire history into the main project
Usage: Include the source code of a library as a subdirectory of your application.
Unlike submodules, subtrees do not:
- need any special constructions (like .gitmodules files or gitlinks) be present in your repository,
- force end-users of your repository to do anything special or to understand how subtrees work.