Re: what is a snapshot?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Ovatta Bianca" <ovattabianca@xxxxxxxxx>
I read in every comparison of git vs other version control systems,
that git does not record differences but takes "snapshots"
I was wondering what a "snapshot" is ? Does git store at every commit
the entire files which have been modified even if only a few bytes
were changed out of a large file?

A snaphot is like a tar or zip of all your tracked files. This means it is easier to determine (compared to lots of diffs) the current content.

Keeping all the snapshots as separate loose items, when the majority of their content is unchanged would be very inefficient, so git then uses, at the right time, an efficient (and obviously lossless) compression technique to 'zip' all the snapshots together so that the final repository is 'packed'. The overall effect is a very efficient storage scheme.

There are some good explanations on the web, such as the
https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain
though you may want to scan from the beginning ;-)

--
Philip
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]