3 ms·
> Conceptually, a git commit is a snapshot. Simple as that. The user doesn't need to worry about how git manages its data internally. This "simple" model is co
by tsimionescu 6y ago
> Conceptually, a git commit is a snapshot. Simple as that. The user doesn't need to worry about how git manages its data internally.
This "simple" model is completely useless when trying to understand what merges, cherry picks, rebases, and patches actually do. Snapshots don't naturally do anything, and can't be combined in any way.
If you think in terms of snapshots, then you have to also start thinking about diff algorithms, and how different diff algorithms can give completely different meanings to what a "merge" or a "rebase" actually mean. Which is true, but given that git comes with one specific diff algorithm built in, and beginners should DEFINITELY not mess with it, it muddies the waters quite a bit.