I'm developing a C++ library that multiple customers will consume via git subtree. The directory structure of my repo looks like this:
foo/
├── extra
├── Makefile
├── src
└── tests
The customers will only be interested in consuming what's in the "src" directory, so I'd like for them to be able to subtree the Makefile as well as the "src" directory and exclude everything else. I have a few ideas but I'm not sure if they're practical. Here's my list so far:
Maintain a customer branch where I would manually delete the unwanted files and directories every time I merge from master.
Have customers use git filter-repo to delete the unwanted directories after a subtree add/pull
Split my repo into "foo-testing" and "foo" where foo would only have the customer visible files "foo-testing" would have the rest.
Option 1 seems like the most straightforward but I'm worried that it may turn into a big headache. Option 2 could work but it requires users to run commands post-subtree. Finally, option 3 seems like it makes the most sense but it requires maintenance of 2 repos. Has anyone here had similar requirements? Any recommendations on the best way to deal with this that won't turn into a maintenance headache down the road?