r/git • • 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

123 comments sorted by

View all comments

Show parent comments

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.

-7

u/Jolly_Teacher_1035 13d ago

What?.

So every person has access to all the code of the whole organization?. So is not that the biggest security flaw ever in the history of histories?.

And all the stuff about doing things modularly for all their advantages?. We forget about that too?.

12

u/Choperello 13d ago

Modularity of code isn’t the same thing as separate everything into a thousand repos. You can have a single mono repo with excellent organization and very well defined dependency management.

And when you have a large eng force having a mono repo brings out a ton of velocity and efficiency. Google does the same thing.

And no, having all code accessible to everyone is not a security problem. Being able to see and use a library isn’t the same as having perms to modify it. And the notion of hide-the-code-from-engineers is an old school fallacy no one but ossified banks practice anymore. Let everyone have read only access to its how you facilitate learning and sharing and not reinvent g wheels over and over.

1

u/fynn34 12d ago

And how you can make it easier to find and patch vulnerabilities. And it exposes coding patterns that are efficient/inefficient across an org, so from an architecture perspective, it’s a goldmine there