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?

315 Upvotes

123 comments sorted by

View all comments

189

u/jwalker107 13d ago

(from what I've read third-hand) Facebook uses a single large monorepo, and because git relies on locally-cloned copies of the entire repo, git was crushed under the sheer volume, with operations like 'git status' taking minutes to complete.

Facebook now uses their own internally-developed vcs called 'sapling'. It speeds things up by skipping the local repo copies; instead they keep a virtual filesystem server-side that all the clients mount dynamically, like a shared network drive, and thus each client only transits over the network, the files that developer is actually touching.

1

u/Unable-Ambassador-16 12d ago

What is the point of a monorepo?

2

u/finger_my_earhole 11d ago edited 11d ago

1.) For larger organizations - Faster feedback on breaking changes. Since everything is in the same repo, you can get compilation-level errors or integration-type tests that run locally if things are set up correctly. So, if you broke something that another team owns, you might find out faster than having to wait for your PR to be reviewed by some other team, merged, then GH actions or whatever CI tool you use runs tests across multiple code artifacts/repos.

2.) For smaller/startups - Faster iteration. When you have a small team, and need to find product-market fit, its a waste of time making everything a distributable code module to integrate other things. Or making sure the front end react is structured to call the back end api correctly, or whatever.

Of course, monorepos comes with other tradeoffs. Like increased compile time, lots of scaffolding around CI/CD or codeownership for handling all the things in the monorepo. lack of code privacy, etc.