We currently have a repository named my-company-php-library
where we have business-specific tools that are reused across a couple of other projects.
Lately, we've added other general purpose helper stuff like array helpers, cache abstractions, Slack notification abstractions, etc.
We're considering splitting the monolith library, but having a dozen small repositories seems excessive:
my-company/array-helper
my-company/cache
my-company/notifications
my-company/session-handler
my-company/db
Question
Is there a way in git where the entire library is in the same repository, but you can clone only a portion of it?
When we have a one-off project that just needs the notifications
module, it seems too much to import the whole thing. Yet, having an entire repository with 2 files also seems like an overkill.