Pull git submodules after cloning project from GitHub

hsz picture hsz · May 27, 2013 · Viewed 39.4k times · Source

I have a project that has specified submodules in it. Everything works well on the dev machine. I have commited .gitmodules file and pulled on the production. However it does not pulled submodules.

If I go into submodule directories and call git pull, nothing happens.

What is the proper way to pull those submodules in the new project ?

Answer

Matt Cooper picture Matt Cooper · May 27, 2013

From the root of the repo just run:

git submodule update --init