3 ms·
Note that there is a third option: both. You can split up a git monorepo with splitsh[1], and/or pull in & out with git subrepo[2] This gets you the best of b
by bryanlarsen 9y ago
Note that there is a third option: both.
You can split up a git monorepo with splitsh[1], and/or pull in & out with git subrepo[2]
This gets you the best of both worlds and avoid most of the cons of both, although you do get a new set of cons, like keeping them in sync and ensure tooling works in both places. It's not too bad, though. Make sure you bless one or the other as the source of truth and make the other basically read-only, and add a hook to automatically merge from one to the other.
1: https://github.com/splitsh/lite https://github.com/splitsh/lite
2: https://github.com/ingydotnet/git-subrepo https://github.com/ingydotnet/git-subrepo
- bryanlarsen 9y agoThere's a fourth option: neither. It's also surprisingly common. A lot of companies have a component named something like CompanyNameSupportLibrary that's pulled in and used by everything. Voila most of the cons of both multirepo and monorepo without any of the benefits.
- catern 9y agoThere is also git-meta: https://github.com/twosigma/git-meta https://github.com/twosigma/git-meta
- bryanlarsen 9y agoCool. It looks like git-meta stores metadata to make git submodule easier, and git-subrepo stores metadata to make git subtree easier.