Git submodules provide a way to consider any repository as a versioned "package" that can be included in any other git repo.
gotcha's
- When you clone a repository git will not automatically clone in the contents of any submodules, but it will clone an empty directory with the name of that repository, in order to actually get the contents of those submodules you have to do the following
- You'll notice that in order to get the contents of your submodules that it's a composite command:
- git submodule init: to initialize your local configuration file
- git submodule update: to fetch all the data from that project and check out the appropriate commit listed in your superproject