Today I Learned - Rocky Kev

TIL that monorepos are so big and can't be used in git

POSTED ON:

TAGS:

Monorepos as big as Facebook, Microsoft and Google don't use git, because of it's limitations.

tl;dr: Git literally cannot handle all that code for those companies.

Our oldest Rust codebase dates to 2016, when the rate of source code changes in Facebook’s monorepo started to encroach on the maximum commit rate that the Mercurial source control management tool could keep up with. In

Facebook actually had to roll out their own source code manager. From Mercurial to a project called (Mononoke.)[https://engineering.fb.com/2021/04/29/developer-tools/rust/]

Google did the same, called (Piper)[https://m-cacm.acm.org/magazines/2016/7/204032-why-google-stores-billions-of-lines-of-code-in-a-single-repository/fulltext]

The Windows Git repository includes about 3.5 million files that weigh in at about 300GB when you check them into Git. Git, however, wasn’t built for a project of this size, so Microsoft developed the Git Virtual File System to be able to get the benefits of using Git without having to wait hours for even the simplest of Git commands to run.

Where Microsoft uses the GVFS (Git Virtual File System) to handle their source control.

The Git client was never designed to work with repos with that many files or that much content. You can see that in action when you run “git checkout” and it takes up to 3 hours, or even a simple “git status” takes almost 10 minutes to run. That’s assuming you can get past the “git clone”, which takes 12+ hours.


Related TILs

Tagged:

TIL the core-js spam trolling

This entire repo is a hilarious rabbit-hole when you combine this with everyone complaining about the console spam that the dev added to it asking if anyone can find him a job. One of my favorite PRs

TIL How many Fucks there are in Linux

As of today, in the Linux Repo, there are comments that contains the following mentions: 1,651 for hacks, 2,863 for workarounds, and 4,102 for fixme

TIL reverting git

Two solutions. One is re-write history and hide your mistakes. The other is showing the history, to remind you of your mistakes.