Git Snapshots vs Deltas

Discussions center on clarifying that Git stores complete file snapshots and whole objects rather than diffs or deltas, addressing common misconceptions and mentioning optimizations like packfiles along with alternatives such as Fossil and Pijul.

πŸ“‰ Falling 0.4x DevOps & Infrastructure
3,016
Comments
20
Years Active
5
Top Authors
#5337
Topic ID

Activity Over Time

2007
1
2008
10
2009
43
2010
67
2011
82
2012
83
2013
76
2014
155
2015
120
2016
151
2017
145
2018
155
2019
158
2020
327
2021
304
2022
321
2023
320
2024
247
2025
223
2026
34

Keywords

slides.pdf caringo.com gitsense.com conflicts.md CFS www.cs wanderinghorse.net VCS couchdb.org VC git diffs files stores file snapshots store hash fossil blobs

Sample Comments

yencabulator β€’ Mar 8, 2023 β€’ View on HN

git typically stores deltas of snapshots of files.

merlincorey β€’ Dec 2, 2014 β€’ View on HN

Git stores whole objects, not diffs, in case you were confused.

fiatjaf β€’ Jul 14, 2017 β€’ View on HN

What does this do that cannot be done with git or similar software + data stored in some standard format?

jimktrains2 β€’ Nov 3, 2018 β€’ View on HN

Git doesn't store deltas, it stores the whole object for each version of the file.

hyperthesis β€’ Sep 6, 2024 β€’ View on HN

This is like when Joel said git stores diffs.

eythian β€’ Oct 2, 2018 β€’ View on HN

Git doesn't store diffs, it stores whole files.

heipei β€’ Apr 23, 2023 β€’ View on HN

It’s completely different as git does not store deltas but snapshots of whole files and file trees.

morelisp β€’ Jun 3, 2023 β€’ View on HN

Git stores snapshots. If you want an alternate calculation of diffs git doesn't stand in your way.

cmrdsprklpny β€’ Oct 24, 2020 β€’ View on HN

Not git, but I believe fossil[1] does this.[1]: https://www.fossil-scm.org/

rimantas β€’ Nov 23, 2011 β€’ View on HN

Git also has much more efficient storage mechanism.