Reputation: 3043
I want to add to my repository a content from another repository, but not the whole repository just a part from sub-directory My/Repo/Resources/Strings
call like this is working for me and it is adding the whole repository to my project
git submodule add -b develop -- git@github:My/Repo.git
But I would like to have something like this:
git submodule add -b develop -- git@github:My/Repo/Resources/Strings.git
can It be achieved by some parameter? I do not really found anything on git-submodules.
The error I received is : fatal: clone of '...' into submodule path '...' failed
Upvotes: 1
Views: 63
Reputation: 94483
I don't believe you can do it. git submodule
tracks entire repositories as a submodules. You can try sparse checkout on the submodule, that the best I could imagine.
Upvotes: 2