So let say I have two repositories with specific modules (or subdirectories) like this:
repo1/
/module1
/module2
/module3
repo2/
/module4
/module5
So on my test server I load these repositories like it is and it is OK, because I get all the code. But on client server, let say I only need his project modules which let say is repo2
, but also one module from previous project which is repo1
.
Is there a way I could clone from repo1
only module1
and then if I would update anything in repo1
that is changed in module1
, when I would do pull
for repo1
(which would have only part of repo cloned), it would update it?
Update So on client server there would be two repos like this:
repo1/
/module1
repo2/
/module4
/module5
For the record I will add my dilemma where I wanted all files in the root folder of the repository and two of the subdirs, but not the other two (very large) dirs. This is what I came up with after also looking here
You can make a sparse checkout for each repos:
(same for repo2)