logoalt Hacker News

nextaccountictoday at 12:03 AM4 repliesview on HN

> Latter commits overwrite work that was done in earlier commits and the story breaks.

> Some people prefer this, as it helps git bisect work better. Debuggability versus reviewer convenience is the tradeoff, I guess.

Ideally we would have a VCS that made ergonomic to store both history-as-it-happened for some purposes, and the cleaned up, squashed and rebased history for other purposes, ensuring they match


Replies

bschwindHNtoday at 12:44 AM

Just squash all the PR commits into one when it gets merged to main or whatever your main branch is.

You can revisit the original PR to see the individual commits if you really want.

gmueckltoday at 3:44 AM

I think that version control has reached a point where the next major evolutionary steps will be based on making history totally shared and immutable with history edits themselves being non-destructive versioned operations that can be browsed as higher order history.

show 1 reply
paradox460today at 1:38 AM

Jj could do that; it stores an evolog of each change, but currently that's kept local

Izkatatoday at 8:31 AM

Force --no-ff merges in git. That's pretty much what you want.