Like sbumodules, subtrees allow linking repositories in a nested way. Compared to submodules, subtrees come with the advantage that it also works with https and that cloning the main repository automatically also clones the content of the subtrees. On the other hand, the git commands using subtrees tend to be lengthy.
In the following, a few hints how to get started with subtrees and how to perform simple subtree operations -- for more information, please refer to the Gitlab documentation.
How it works