Bram Cohen Proposes Safer Version Control: 'Safe Rebase' and 'Safe Squash' Without Losing History

Available in: 中文
2026-03-29T21:56:03.728Z·1 min read
Bram Cohen, creator of BitTorrent, has published a follow-up essay on version control design proposing 'safe rebase' and 'safe squash' operations that preserve full history rather than rewriting it...

Bram Cohen, creator of BitTorrent, has published a follow-up essay on version control design proposing 'safe rebase' and 'safe squash' operations that preserve full history rather than rewriting it as Git does.

The Problem with Git

Cohen argues that Git's approach to rebase and squash is fundamentally unsafe because it throws out history and replaces it with a fiction. 'Git supports squash and rebase the way writing with a pen and paper supports inline editing. It implicitly makes humans do a lot of the version control system's job.'

The Proposed Solution

Cohen's approach allows 'safe rebase' by picking one parent as primary and 'safe squash' by picking a further back ancestor as primary. The key advantage: it gives strictly more information than Git's approach. The safe versions always follow the primary path for blame/history, producing outputs nearly identical to Git, but still remember the full history.

Key Innovations

The Trade-off

The approach requires committing to diffs at commit time, which Cohen acknowledges creates some implementation risk. The core functionality would need to be extremely well-tested and audited, updated only conservatively.

Broader Context

Cohen's goal is to build something compelling enough to make switching from Git worthwhile. The case is that for the minor cost of diff-based commits, you get safer operations, better undo, and no footguns from squashed or rebased content.

Source: bramcohen.com, Hacker News (26 points)

↗ Original source · 2026-03-29T00:00:00.000Z
← Previous: Next Week's Key Events: Iran War Developments, US Non-Farm Payrolls, China PMI DataNext: Show HN: Glupe - A New Programming Language Looking for Community Feedback →
Comments0