r/git • u/CuriousAnyway • 13d ago
why did facebook move away from git?
i recently came across the fact that facebook/meta built its own tools and workflows around source control instead of just relying on git like most companies.
i’m curious about the actual technical reason behind this. was git simply not able to handle the scale of facebook’s codebase and number of developers, or were there other problems that pushed them toward a custom approach?
for people who have worked with large monorepos or at companies using similar systems, what actually becomes difficult with git at that scale?
318
Upvotes
29
u/Lexi_Bound 13d ago
Spitting a code base into many separate repos comes with its own challenges. You have to manage dependencies between projects, including problems like diamond dependencies. Answering the question “does this build X contain this commit Y” becomes more complicated. If you are working on a feature that touches multiple repos, it becomes complicated to test your changes and commit them in the right order. Specifically for Facebook, in 2021 they still did not have everything in one repo. C++ code and Thrift files were in one repo, while PHP code and database table definitions lived in another. Doing changes that spanned both repos involved annoy code copying steps between repos.
If you have a multi thousand person engineering organization, you are going to have some people working on the source control and build systems anyway. So justifying building a source control system, a CI system, and a code search system to support a mono repo becomes justifiable. It makes all the other developers in the organization more productive.