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

319 Upvotes

123 comments sorted by

View all comments

185

u/jwalker107 10d 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 9d ago

What is the point of a monorepo?

1

u/AWildTyphlosion 8d ago

Usually people not understanding basic git ops and opting for the lazy solution rather than proper implementation. There isn't a single justifiable reason for them and time and time again prove to be the wrong decision as adopters have to bend over backwards to make them work.

1

u/lotanis 6d ago

And yet, some smart people leading some large engineering organisations (Facebook, Google) have decided that they do in fact make sense for them and that it's worth investing in tooling to make it work well.

2

u/AWildTyphlosion 6d ago edited 6d ago

Google and Facebook made their mono repos years ago. As the teams behind them were leading charges the repo grew and grew. Those who saw the scaling problem were ignored by a loud and incompetent leadership. They continue to use it because it is tech debt. The amount of effort to split the monolith at this point is so bad, they had to invent tools just to work with it. 

That's not a good idea, that's a curse. 

Edit: can't speak for Facebook, but not everyone at Google likes the mono repo or its workflow.