Git · Setup and remotes
git submodule add
Adds another repository as a submodule at a path.
Syntax
git submodule add <url> <path>Example
Example
git submodule add https://github.com/example/lib.git vendor/lib
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.