each repo Lightweight repository, narrow clones High flexibility of dependency upgrade Independent upgrade & versioning strategy Manage like open source applications Easy to open the source to public Multi Repository System PROS
Cross repo changes and refactorings are painful Adds overhead if one team handles multiple repos It hurts your ability to navigate the code Need to open multiple IDEs to write code Need to manage versions of many small libraries Long release procedure, open for failure Need to pull changes on many repos Multi Repository System CONS
and deployed independently, the code for all services lives in one repository The repository contains more than one logical project (e.g. an iOS client and a web-application) These projects are most likely unrelated, loosely connected or can be connected by other means (e.g via dependency management tools)
versioning, one source of truth You don’t need to define version numbers Cross-project refactoring and implementation is easier Forcing dependencies to update to latest Effective code reviews Sharing common components No wasting time dealing with multiple git commands Mono Repository System PROS 1
and a lot of communication through pull requests. We want to build one team with knowledge across services as opposed to several teams with localized knowledge. What do we want No Silos To experiment cross-platform refactorings We want to remove code duplication, decrease coupling and increase cohesion inside sourcecode. That needs creating extra modules and projects. To improve efficiency of release & deployment We want to use latest/best versions of dependencies. And that would be for all modules and platforms.
the Linux kernel, which checked in at 17 million lines of code and 44,000 files in 2013. Test repo: 4 million commits Linear history ~1.3 million files The size of the .git directory was roughly 15 GB The size of the index file was 191 MB Who migrated from multi to mono repositories? Facebook
system available to just about every engineer inside the company. One repository, huge activity: Google’s 25,000 engineers About 45,000 commits (changes) to the repository each day Google engineers modify 15 million lines of code across 250,000 files each week. Who migrated from multi to mono repositories? Google h!p://cacm.acm.org/magazines/2016/7/204032-why-google-stores-billions-of-lines-of-code-in-a-single-repository/fulltext Why Google Stores Billions of Lines of Code in a Single Repository
What people say? And you should feel the benefit almost immediately. Whenever I’ve done this, it’s felt like an absolute breath of fresh air, and has immediately made me happier.:))) - David R. MacIver, Ex-Google Engineer
have a wealth of libraries already available to you. Almost everything has already been done.” - Rachel Potvin, Engineering Manager at Google What people say? Our productivity has increased at least 5x. - Shippable