Chris Bier
Chris Bier

Reputation: 14437

Why doesn't the .git directory have a large file size?

If Git can restore deleted files by reverting to a previous commit shouldn't the .git directory have a very large file size since it holds all of the data that was deleted?

I'm deleting large images etc. and my .git directory does not seem to hold nearly enough data to restore such large files.

I'm guessing that a good deal of compression is involved?

Upvotes: 1

Views: 45

Answers (1)

Levi Haskell
Levi Haskell

Reputation: 853

Yes, there is a great deal of compression as well as delta encoding involved.

More details here: http://git-scm.com/book/en/v2/Git-Internals-Packfiles

Upvotes: 2

Related Questions