Skip to main content

How can I add a submodule to a Git repository?

11 Aug 2013 - git

The following commands checkouts the git repository at subproject-url into the subproject-path and updates the .gitmodules file.

git submodule add subproject-url subproject-path