3 ms·
> A commit is not a snapshot and a patch. It is literally only a snapshot. When you do cherry-pick, you supply a commit id, but actually a patch (diff between
by bornfreddy 3y ago
> A commit is not a snapshot and a patch. It is literally only a snapshot.
When you do cherry-pick, you supply a commit id, but actually a patch (diff between the commit and its parent) is applied. So yes, commit (/id) can mean a patch in some cases.
- IshKebab 3y agoNo. The operation involves diffing snapshots to make a patch and then applying that patch. But a commit is still only ever a snapshot. Like, is an ordinary file a patch? No of course not. But you can still turn it into a patch by diffing two files. In the same way a commit is just a set of files. But you can turn it into a patch by diffing two commits. > commit (/id) can mean a patch in some cases. It doesn't. It means "which snapshot would you like me to turn into a patch by diffing with its parent snapshot?"