When developers talk about modern developer workflows, the conversation often turns to distributed version control, code review platforms, and tooling that streamlines the entire software development life cycle. While Git has long been the standard in this space, alternative systems like Sapling and platforms like Phabricator (a code review and repository hosting platform) are increasingly part of the conversation. Incorporating Graphite—a code review and workflow tool that builds on top of Git—further expands the toolbox of modern version control ecosystems. Understanding how Sapling, Phabricator, and Graphite differ can help developers choose the right tools for their workflow.
Understanding the architecture and workflows
Sapling (a version control system): Sapling is a distributed version control system (a tool that manages changes to source code across many developers and hosts copies of the entire project history locally). Sapling was originally developed at Meta to handle very large repositories more efficiently than standard Git. Under the hood, Sapling focuses on scalable data structures and advanced performance optimizations. It stores project data in a way that makes partial cloning and fast operations more intuitive, and it relies on a sophisticated storage format that allows for quick context switching between branches.
Phabricator (a code collaboration platform): Phabricator, on the other hand, is not a version control system itself. Instead, it is a platform that provides code review, repository hosting, and project management functionality. Its workflows revolve around “differential” (Phabricator’s own code review tool) and “maniphest” (Phabricator’s issue tracker). Phabricator integrates with Git, Mercurial, and SVN repositories. Under the hood, Phabricator runs on a stack of PHP and MySQL, storing metadata, code review comments, and project data in a relational database. Most developers interact with Phabricator using the Arcanist command-line tool to create code reviews (arc diff
), land changes, and maintain a consistent review workflow.
Graphite (an intelligent code review tool): Graphite works directly with Git and helps developers manage stacked diffs (a series of related changes that depend on each other). Under the hood, Graphite keeps your Git history organized by making it easy to submit small, incremental changes that build on top of one another. Graphite's command-line tool allows you to create stacks of branches, submit code reviews, and maintain a streamlined development flow. Graphite works by storing a special metadata reference in your repository to keep track of the relationship between stacked branches, ensuring that each subsequent feature branch cleanly builds on top of main
.
Key differences in operations
Cloning and repository setup:
- Sapling: A typical Sapling operation might be
sl clone https://example.com/some_repo
which creates a local copy of a project. Sapling’s architecture handles partial clones more gracefully because of its optimized storage format. - Phabricator: You would still rely on Git to clone your repository with something like
git clone https://example.com/repo.git
. Phabricator itself just points you to these repositories and tracks them, but does not replace the underlying version control tool. - Graphite: Since Graphite works on top of Git, you’d first do a
git clone
and then start managing stacks withgt stack
. You still use Git for the core operations, while Graphite adds a structured layer on top.
- Sapling: A typical Sapling operation might be
Branching and merging:
- Sapling: Branching in Sapling is designed to be fast and lightweight, leveraging its underlying data structures. Merging in Sapling benefits from its representation of changes as first-class objects, making merges more efficient.
- Phabricator: Branching and merging still occur at the Git level. Phabricator comes into play when you want to propose changes through
arc diff
, which creates a code review. The merging is done either by Git commands or by Phabricator’s landing mechanism, which essentially runs Git commands under the hood on the server side. - Graphite: With Graphite, you create stacked branches by running
gt upstack
orgt downstack
. Each stacked branch is a standard Git branch, but Graphite keeps them organized. Merging happens by merging each branch in sequence, ensuring your stack remains linear and reviewable.
Code reviews and collaboration:
- Sapling: Sapling is primarily focused on version control operations. While it has been used internally at large scale (with code review systems built around it), it doesn’t ship by default with a code review platform. You would integrate Sapling with a separate review tool.
- Phabricator: This is where Phabricator shines. Its
arc
tool allows you to runarc diff
, which creates a “Differential” revision. Under the hood, this sends patches and metadata to the Phabricator server, where other developers can comment, request changes, and eventually approve. - Graphite: Graphite integrates directly with GitHub (or other Git hosts) for reviews, but also provides a CLI-based workflow for stacked diffs. By running
gt submit
, Graphite can open multiple pull requests at once, each corresponding to a separate stacked branch. Graphite uses Git references and metadata to keep track of the relationships, ensuring that the code review process is more linear and easier to navigate.
Integrating all three
A developer might use Sapling for its performance benefits in large repositories, Phabricator for team-wide code reviews and planning, and Graphite to maintain a consistent chain of incremental changes. While this mix is not typical, each tool addresses different concerns. Sapling replaces Git for scaling, Phabricator provides a rich review environment, and Graphite ensures incremental workflows remain simple and organized.