1

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

Csabi
  • 4,355
  • 15
  • 58
  • 106

1 Answers1

2

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.

phd
  • 69,888
  • 11
  • 97
  • 133