News for hackers. Stuff that matters.
Re:Git’s database internals I: packed object store by mandeepj on Monday August 29, 2022 @10:52AM (#32639009)
> It just stores the full content of every file every time it’s modified and committed.

That's not true; otherwise each git branch folder would be huge, but it's not. It stores the snapshot of changes in branch folders

Re:Git’s database internals I: packed object store by _ikke_ on Monday August 29, 2022 @11:01AM (#32639127)
> It stores the snapshot of changes in branch folders

No, gp is right. There is no snapshot of changes. Each unique version of a file is an object in the object store. That does mean each commit would only introduce new objects for files that have changed (these are already added to the object store when you use `git add`) .

But the pack files like the article explains (which are created regularly during gc/maintenance runs) is why the repo size can often be smaller then the working tree.

> Not only is each object compressed individually, they can also be compressed against each other to take advantage of common data.

Re:Git’s database internals I: packed object store by CorrectHorseBat on Monday August 29, 2022 @12:13PM (#32639942)
Branches are just pointers to commits in Git. How those commits are stored doesn't affect their size.
Re:Git’s database internals I: packed object store by thro388 on Monday August 29, 2022 @10:54AM (#32639051)
Maybe OP stores binary files?
Re:Git’s database internals I: packed object store by sekao on Monday August 29, 2022 @10:57AM (#32639092)
Binary files are also delta'd in git.