Git Submodule Basic Usage Examples

Last updated:

creating a submodule

(submodule gets created, but files aren't actually put into the folder)

inside an existing git repository, do:

git submodule add git://github.com/some_user/some_project.git some_folder

initialising (populating) the submodule

(this is where files get actually downloaded)

in the outer repository, do:

git submodule init

and then do:

git submodule update

Dialogue & Discussion