4 ms·
I think you may be thinking of a different VCS such as SVN as Git actually just stores the meta data (changes/deltas) and not full versions of the file in each
by bencevans 14y ago
I think you may be thinking of a different VCS such as SVN as Git actually just stores the meta data (changes/deltas) and not full versions of the file in each commit.
As an example when you clone a repository, it downloaded it, then in goes through a process of 'Resolving Deltas'. This is it going through the history applying the changes/deltas to the files so that they are up to the most recent revision.
The only files that are added in full are binary files.
Some reading: http://git-scm.com/book/en/Git-Internals-Packfiles http://git-scm.com/book/en/Git-Internals-Packfiles :)
- Cogito 14y agoTo be fair, it uses the full blob until you pack, which is not immediately and depends on your settings. Large repositories spend a significant amount of effort determining optimum window pack sizes etc to optimise the packing of their history. So, git can be quite heavy on disk usage, until all the loose objects are packed.