logoalt Hacker News

steveklabnikyesterday at 12:38 AM2 repliesview on HN

When you edit a commit, it creates a new commit. They are immutable. You can still find the old commit via the reflog, until it gets eventually gc'd.

If I had to guess a reason they were downvoted (and I didn't downvote, to be clear), it's probably because people see stacked diffs as specifically solving "reviews clearly taking too long, too much content in there", and so it feels contradictory. Then again, as I said, I didn't downvote!


Replies

mortaryesterday at 8:05 PM

I agree with the sentiment but hash collisions can occur with different content which doesn’t really make them immutable.

normie3000yesterday at 6:34 PM

Thank you for the correction.