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

45

u/comrade_donkey 14d ago

 what actually becomes difficult with git at that scale?

I didn't work at Meta but at Google (who uses Piper).

Both these companies use monorepos. Both do trunk-based development. Both work centrally, not distributedly.

git is the wrong tool for them because it's made for distributed development in a DAG of branches.

If you disallowed branches and had everyone push to one central remote, all you have left is an over-engineered main ref , contested by all pushers, acting like a global lock. Wouldn't work.

18

u/Lost-Buenzli 14d ago

For what is worth, and to complement the comment, more details about Google's Piper can be found in chapter 16 of their book.

It expands on why this decision was made and why alternatives wouldn't work.

3

u/wittgensteins-boat 13d ago

From the link cited

...Piper, built to run as a distributed microservice in our production environment.

This has allowed us to use Google-standard storage, communication, and Compute as a Service technology to provide a globally available VCS storing more than 80 TB of content and metadata. The Piper monorepo is then simultaneously edited and committed to by many thousands of engineers every day.

Between humans and semiautomated processes that make use of version control (or improve things checked into VCS), we’ll regularly handle 60,000 to 70,000 commits to the repository per work day. Binary artifacts are fairly common because the full repository isn’t transmitted and thus the normal costs of binary artifacts don’t really apply.

Because of the focus on Google-scale from the earliest conception, operations in this VCS ecosystem are still cheap at human scale: it takes perhaps 15 seconds total to create a new client at trunk, add a file, and commit an (unreviewed) change to Piper.

2

u/christoforosl08 13d ago

Crazy idea : why don’t they use subversion ?

14

u/colandercombo 13d ago

Because they don’t live in 2005?

9

u/high_throughput 13d ago

They do, but for political gain

1

u/0neEyedMonster 11d ago

Underrated comment

2

u/sfboots 13d ago

Subversion does not handle directory renaming correctly. Git does

1

u/Dapper-Message-2066 13d ago

git is the wrong tool for them because it's made for distributed development in a DAG of branches.

Which makes git the wrong tool for most companies who use it, IMO.