News for hackers. Stuff that matters.
Re:Commits are snapshots not diffs (2020) by johntb86 on Thursday April 08, 2021 @03:00PM (#26742421)
That's true, but git doesn't natively have a way to refer to a single diff. You can use a hash to refer to a commit, but that depends on the entire history up to that point. If you rebase a commit then the hash changes, even if the new commit is semantically the same.
Re:Commits are snapshots not diffs (2020) by jdoliner on Thursday April 08, 2021 @03:03PM (#26742466)
It kinda does, `git show <commit>` does exactly what one would expect if commits were actually diffs. That is it shows the diff between <commit> and its parent.