Git submodules are a way of including another repository’s code into an existing codebase, without associating it’s code or tracking history in the parent repository.
Add a Git Submodule to an Existing Codebase
So let’s say that we have a project called
project_website, a repository at the following path
https://github.com/user/repo.git and a target folder we’d like the submodule added to at
user_repo, we could construct our query like this: