4 ms·
One big advantage of a monorepo is that when you check out the tree you automatically get the versions of all the files that work together (assuming there's som
by gumby 5y ago
One big advantage of a monorepo is that when you check out the tree you automatically get the versions of all the files that work together (assuming there's some CI!). If you want to refactor an API you can refactor its callers easily and check the whole thing in. Etc.
With each project having its own repo, then you have to track the fact that Foobar 2.2 works with baizo 1.6-1.8 but not more recent versions.
Also conceptually it's easier when you are working with the client and the server at the same time, or the two mobile apps, and so on.
Of course people manage without this when the project has stuff that doesn't fit in a software repo (CAD designs, artwork, etc...there's a reason why that POS Perforce survives, for example). Solidworks has its own proprietary RCS that doesn't work with anything else.
IMHO if the project is relatively small (say <500K LoC) a monorepo is almost always the way to go. But with a big project it breaks down.
- beagle3 5y agoIt’s basic git that breaks down, not the monorepo model. And it’s less about LoC, and more about the number of files and how much binary stuff you put in your repo (and how often it changes). Git is really bad when binary data is involved. Git has the facilities to keep monorepos clicking along (shallow clones and sparse checkout) but they aren’t along the “happy path”
- drjasonharrison 5y agoAnd many git repository hosting services, like bitbucket, have limits on how large your repository can be. Sometimes you can upgrade these limits. This often leads to fear of exceeding this limit and can lead to one repository per module.
- romwell 5y agoThat's why there's git-lfs[1] (large file storage) Keeps the binaries out of your repo, replacing them with pointers [1]https://git-lfs.github.com https://git-lfs.github.com
- vlovich123 5y agoThat’s an interesting claim considering Google, Facebook and Microsoft run monorepos. Heck Apple does too internally although just for the build team (snapshots of each project submitted to them, but it all goes into a mono repo)
- romwell 5y ago>IMHO if the project is relatively small (say <500K LoC) a monorepo is almost always the way to go A typo? You seem to mean that multi-repo is the way to go :)