Why doesn't Facebook use git?

Theo - t3․gg2 minutes read

Facebook decided not to use git due to scaling limits, slow performance, and resistance from git maintainers. The adoption of Mercurial over git at Facebook led to performance improvements, the extension of fabricator, and the creation of stacked diffs for code review parallelization.

Insights

  • Facebook's decision not to use git was influenced by the limitations of git's capabilities as their code base grew, resulting in slow performance and scaling issues.
  • The choice to adopt Mercurial over git at Facebook was driven by prior experience with Mercurial, emphasizing the importance of familiarity and expertise in selecting the right tools for efficient code management.

Get key ideas from YouTube videos. It’s free

Recent questions

  • Why did Facebook decide not to use git for version control?

    Facebook engineers found that their code base outgrew git's capabilities, leading to slow performance and scaling limits. Basic git commands took over 45 minutes to complete, prompting the exploration of alternatives.

  • What alternative version control systems were considered by Facebook?

    Facebook considered alternatives like Perforce and BitKeeper, but ultimately chose Mercurial for its performance and cleaner architecture. Mercurial, developed in Python using object-oriented patterns, proved to be extensible and efficient.

  • How did Facebook engineers improve scaling with Mercurial?

    Facebook collaborated with Mercurial, leading to significant improvements in scaling. This collaboration prompted Microsoft to contribute to git, showcasing the impact of choosing the right version control system for large code bases.

  • What challenges did Facebook face when considering extending git for larger monorepos?

    Facebook considered extending git to support larger monorepos but faced resistance from git maintainers. Sharding the monorepo was suggested but deemed infeasible, highlighting the complexities of scaling with existing tools.

  • What key factors influenced Facebook's decision to migrate to Mercurial?

    Facebook's internal migration to Mercurial involved months of socializing the change, mapping common commands between git and Mercurial, and advocating for the switch. The commitment to the migration led to performance improvements, extension of fabricator support, and the creation of stacked diffs for code review parallelization.

Related videos

Summary

00:00

Facebook's Decision: Not Using Git for Version Control

  • Facebook does not use git for version control.
  • Graphite, a channel sponsor, provided in-depth information on Facebook's decision not to use git.
  • Graphite was inspired by Facebook's internal tooling, particularly the concept of stacked diffs.
  • Facebook engineers were trained on Mercurial patterns and stack diffs, leading to the decision not to use git.
  • Facebook's code base outgrew git's capabilities, leading to slow performance and scaling limits.
  • Facebook engineers simulated the expected growth of their code base, revealing that basic git commands took over 45 minutes to complete.
  • Facebook considered extending git to support larger monorepos but faced resistance from git maintainers.
  • Sharding the monorepo was suggested by git maintainers but was not feasible for Facebook.
  • Facebook's collaboration with Mercurial led to significant improvements in scaling, prompting Microsoft to contribute to git.
  • Alternatives to git, like Perforce and BitKeeper, were considered but ultimately Mercurial was chosen for its performance and cleaner architecture.

11:41

"Facebook's Mercurial Migration: Speed and Collaboration"

  • Mercurial, a C code, was developed in Python using object-oriented patterns, designed to be extensible.
  • Despite Python not being known for speed, Mercurial's performance was impressive due to Python's fast bindings to other elements.
  • An engineer with prior Mercurial experience led the investigation, prompting a team decision to attend a Mercurial hackathon in Amsterdam.
  • Facebook's team extensively explored alternatives before considering Mercurial, highlighting the importance of prior experience in decision-making.
  • Facebook's internal migration to Mercurial involved months of socializing the change, mapping common commands between git and Mercurial, and advocating for the switch.
  • Facebook's commitment to the migration led to performance improvements in Mercurial, the extension of fabricator to support it, and the creation of stacked diffs for code review parallelization.
  • The human-driven aspect of technical decisions, like the adoption of Mercurial over git at Facebook, emphasized the significance of kindness and openness in technology adoption and development.
Channel avatarChannel avatarChannel avatarChannel avatarChannel avatar

Try it yourself — It’s free.