The Case Against Rebase: Why Fossil SCM Rejects Git's History-Rewriting Tool
Share this article
In the heated debates over version control workflows, Git's rebase command is often hailed for creating clean, linear histories. Yet Fossil SCM—the distributed system created by SQLite architect Dr. Richard Hipp—intentionally excludes rebase entirely. Why? Because Fossil's design treats rebase as a harmful anti-pattern that sacrifices historical accuracy for artificial simplicity. This stance isn't just ideological; it's rooted in tangible risks to collaboration, debugging, and long-term code health.
The Illusion of Cleanliness
At its core, rebase rewrites history by transplanting a sequence of commits onto a new base, discarding original parentage. As Hipp explains, this is essentially "a merge that forgets where it came from." For example, Git's rebase documentation illustrates how transforming a branch from C3-C5 to C3'-C5' produces identical code to a merge commit like C7—but without recording the true ancestry.
Original branch: A─B─C3─C5 (feature)
\
C4─C6 (main)
After rebase: A─B─C4─C6─C3'─C5' (artificially linear)
After merge: A─B─C3─C5─C7
\ /
C4─────C6
Proponents argue this creates a "cleaner" history. Fossil counters that this exposes a tooling deficiency: "Wouldn't it be better to enhance history display mechanisms so rebasing becomes unnecessary?" Instead of altering history, Fossil uses annotations to simplify views while preserving truth.
Collaboration and the Perils of Private Branches
Rebase's "golden rule"—never use it on public branches—encourages developers to work in isolation. This siloed approach, Fossil argues, is antithetical to quality. Research like Nagappan's Windows Vista study shows bug rates plummet when teams communicate closely. Private branches inhibit this:
"Keeping private branches does not prove developers are communicating insufficiently, but it is a key symptom of that problem."
Psychologically, rebase feeds what Gerald Weinberg termed "egoless programming" failures. Developers hoard changes to avoid exposing mistakes, delaying feedback. Yet as Hipp notes, "humble programmers generate better code" because early peer scrutiny catches errors faster.
Debugging and Maintenance Nightmares
Squashing commits via rebase obliterates context critical for troubleshooting. Consider a git bisect identifying a bug in a rebased "clean" commit that collapsed ten original changes. Developers must then manually dissect the monolith to find the faulty step. Fossil preserves all intermediate commits, letting bisect pinpoint the exact change.
Similarly, blame operations suffer. A 500-line rebased commit obscures the incremental reasoning behind code, forcing maintainers to "be smarter than the original developers" to decipher intent. Fossil's granular history, with timestamps intact, avoids this:
"We believe it is easier to understand a line of code from the 10-line check-in it was part of than a 500-line check-in that collapses a branch."
Fossil's Alternatives: Honesty as Policy
Without rebase, Fossil relies on:
- Cherry-picking: Moves specific commits between branches while documenting origins.
- Annotations: Adds metadata (e.g., for clarifying history) without altering commits.
- Atomic commits: Encourages small, testable changes to simplify integration.
These avoid rebase's pitfalls. For instance, backporting a fix from a feature branch to stable is trivial with Fossil's cherry-picks but treacherous if the fix is buried in a rebased commit. Legal and historical analysis also benefits from preserved timestamps—rebasing either creates confusing "timewarps" or erases creation dates.
The Verdict: Tools Over Tricks
Rebase persists because Git's history visualization is rudimentary. Fossil's rejection is a call to fix tools rather than obscure reality. In an era of complex software, preserving history isn't just ethical—it's pragmatic. As Hipp concludes, "Rebase is dishonest. It deliberately omits historical information. And it has no offsetting benefits." For teams valuing transparency and collaboration, that’s a compelling case to let history stand uncensored.
Source: Fossil SCM Documentation by Dr. D. Richard Hipp.