Clone submodule into directory

Posted by andypaxo on Stack Overflow See other posts from Stack Overflow or by andypaxo
Published on 2012-12-19T01:15:34Z Indexed on 2012/12/19 5:03 UTC
Read the original article Hit count: 104

Filed under:
|

I'm having an issue with creating a submodule in my project. If I create the submodule directly in the repository root, everything works fine. If the submodule is any deeper, the repository does not get cloned.

For example, this works as expected:

git submodule add git://someproject.com/.git someproject

However, when I run the following command, the project is added to .gitmodules and an empty repository is created, but no code is pulled down (even after a git submodule update --init). The command does not produce any output.

git submodule add git://someproject.com/.git lib/someproject

© Stack Overflow or respective owner

Related posts about git

Related posts about git-submodules