6 ms·
Julia Evans wrote a nice blog post about this recently, in that sometimes it's helpful to think commits as snapshots and sometimes as diffs. https://jvns.ca/bl
by phillco 3y ago
Julia Evans wrote a nice blog post about this recently, in that sometimes it's helpful to think commits as snapshots and sometimes as diffs.
https://jvns.ca/blog/2024/01/05/do-we-think-of-git-commits-as-diffs--snapshots--or-histories/ https://jvns.ca/blog/2024/01/05/do-we-think-of-git-commits-a...
I guess while it's true the storage layer is snapshot based, as you say, that only gets you so far conceptually, and it's probably best to focus on the _operation_ you're doing, as rebase, cherry-pick, apply-patch, etc are easier to think in terms of diffs.
When I used to use Phabricator, the fact that I could always fall back to handing it a raw patch file to submit changes also made it easier to reason about (regardless of what the server and client were actually doing).
- infogulch 3y agoCommits have a dual snapshot-like and diff-like nature, depending on how you observe them.