Sapling: A Source Control System developed at Meta, designed to emphasize usability and scalability. Its system is both familiar to Git and Mercurial users and is engineered to simplify workflows such as working with stacks of commits and recovering from errors. It is especially effective in large monorepo environments and has the capability to scale to tens of millions of files, commits, and branches.
Intuitive UI: Sapling introduces a user-friendly interface that scales well for large repositories, making development workflows such as committing, amending, and pushing changes straightforward.
Git Integration: It supports interactions with Git repositories, enabling developers to work seamlessly with GitHub and other Git hosting services.
Stacking Work: Sapling simplifies the process of stacking, iterating, and submitting code changes for review. It aims to eliminate the complexities associated with branching in Git.
Smartlog: A central feature that provides a clear and concise view of the local repository, showing not-yet-pushed commits, important branches, and the relationship between commits.
Sapling was birthed from the need to handle Meta’s growing monorepo and the scaling challenges that existing source control systems could not meet. It offers a source control experience that boosts developer velocity by simplifying complex workflows and making them accessible to all developers, not just power users.
For new users, Sapling introduces a series of basic concepts through a hands-on approach, demonstrating cloning a repository, making and amending commits, undoing changes, and pushing work—all with simple command-line instructions.
Sapling is compatible with major operating systems including macOS, Windows, and Linux, with detailed instructions for installation provided for each. It also outlines necessary dependencies and configurations to ensure a smooth setup.
Sapling offers advanced commands for manipulating commit stacks, editing history, and managing changes efficiently. It emphasizes undoing mistakes safely with the hide/unhide feature and encourages exploration and learning through its undo capabilities.
While built on familiar concepts, Sapling introduces several behavioral differences from Git and Mercurial, aimed at simplifying the version control process. These include a lack of staging area, automatic restacking of commits, and first-class support for undo commands.