git-submodule
Inspect, update, and manage submodules. tldr-pages
On several platforms
Several platforms
View existing submodules and the checked-out commit for each one
git submoduleIdentifyInstall a repository's submodules (listed in .gitmodules)
git submodule update --init --recursiveIdentifyAdd a Git repository as a submodule of the current one
git submodule add repository_urlIdentifyAdd a Git repository as a submodule of the current one, at a specific directory
git submodule add repository_url path/to/directoryIdentifyUpdate submodules to their latest commits
git submodule update --remoteIdentifyChange the URL of a submodule
git submodule set-url path/to/submodule new_urlIdentifyUnregister a submodule (e.g. before removing it from the repository with git rm)
git submodule deinit path/to/submoduleIdentify