Alex Rivera | Logout

How do I "git clone" a repo, including its submodules?

Asked 2010-09-26T07:13:25.943
2819

How do I clone a git repository so that it also clones its submodules?

Running git clone $REPO_URL merely creates empty submodule directories.

Edit
Report

1 Answer

35

Try this:

git clone --recurse-submodules

It automatically pulls in the submodule data assuming you have already added the submodules to the parent project.

answered 2013-01-16T18:39:31.563

Your Answer