4 ms·
> the official documentation always talks about the changes between commits, or the change introduced by a commit (which means the changes to the parent commit)
by tomn 3y ago
> the official documentation always talks about the changes between commits, or the change introduced by a commit (which means the changes to the parent commit)
That's exactly what i was referring to. If you have a commit, that is both a snapshot (as stored in the tree reference) and a change (because it has references to parent commits, which are also snapshots). Of course the wording is factually accurate, but it refers to computing the change, because that's how it is best explained, and how those commands (rebase/cherry-pick/revert) work conceptually.
If you try to understand those commands without thinking about diffs, you can come unstuck.
Commands like reset of course don't talk about changes, because that's not relevant for how they work. Understanding both models and their equivalence is helpful, IMO.