Git Submodules

September 12, 2017

So you've clone a repo and there is a directory in it. Also, you have a file called .gitmodules. Now what?

What you have is a reference to a git submodule. Look in the .gitmodule file and your directory will be described there.

The next step is to initialize the submodule

$ git submodule init

Then you update the submodule to pull in files.

$ git submodule update

Tags: git