Description
git-branchless is a suite of tools that enhances Git and makes it easier to use, for novices and power users alike. Its best-known command is git undo, a general-purpose undo for Git operations. It also adds a smartlog visualisation, git restack to repair broken commit graphs, and speculative merges that reveal merge conflicts in advance. For patch-stack workflows of the kind used by the Linux and Git projects, it offers git sync to rebase all local stacks and branches without checking them out, git move to move subtrees, anonymous branching for experiments, git next and git prev to move through a commit stack, and an interactive switch. The project is built for speed in large repositories. Operations run in memory and avoid touching the working copy by default, it uses sparse indexes and a segmented changelog for fast merge-base queries, it is written in Rust, and it spreads work across CPU cores. The author reports benchmarks on the Linux kernel repository with over one million commits and the Gecko repository with over 700,000 commits. The README says the tools are 100% compatible with branches, and it includes a user guide and design goals.…
Highlights
- git undo for recovering from mistakes
- Smartlog and restack for commit graphs
- Patch-stack workflows and git sync
- Fast in-memory operations written in Rust
Ratings & Reviews
No ratings yet
Be the first to rate Git Branchless.
People also visit

git-worktrees
Working on multiple branches simultaneously, context switching without stashing
Git Branchless FAQ
What is git-branchless?
A suite of tools that enhances Git, with commands such as git undo, smartlog and git restack.
What does git undo do?
It is a general-purpose undo command for Git operations, which the author describes in a blog post.
Is it compatible with branches?
Yes. The README says the suite is 100% compatible with branches.
Is it built for large repositories?
Yes. The author says it operates in memory, avoids touching the working copy, and was benchmarked on the Linux and Gecko repositories.
Which language is it written in?
Rust.
Where are the docs?
The README links a user guide and design goals.
What are the best Git Branchless alternatives?
Popular alternatives to Git Branchless include Git Town, GitButler and ZBG. See all Git Branchless alternatives







