1

I have many files and folders I would like to make composition with. The problem with submodules is that I would have to create one repo for each of my files/folders.

Could sparse checkout be a way to keep everything in one repo and still be able pick what I want for a specific composition and also be able to update changes that are made in the main "core" repo ?

François Richard
  • 6,817
  • 10
  • 43
  • 78

1 Answers1

2

No, as I mentioned in your previous question:

Git sparse checkout is for getting part of one repo.
That means MyCompositeRepo1 and MyCompositeRepo2 would not be independent repo, but the same repo as MyCoreRepo with different content.

If you intent to keep only one repo, it is best to keep different branches with different content.
Ie 3 branches, each one with only the files you need.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250