Well git it12/27/2022 Git finds a balanced way between the performance and disk space cost. Git will faster than other VCS which use delta ways at commit stage and costed the disk size just be similar to the other VCS that use delta ways. After these work git gc, the disk cost by git will just like the other VCS which uses delta ways. But the benefits of using snapshot shorten the time at commit stage.īut the brilliant git will do another job git gc after this from time to time which created PACKFILES and removes the snapshot which contents are similar to shrink the size of itself. In this case, git will cost more disk space than the other vcs (such as subversion) which saves delta between the new version to the old version of the same file. This also called the loose object format. Even if we just changed one letter of one file, git will save the whole file as a snapshot. These three new files are also S.N.A.P.S.H.O.TsĮvery time we do COMMIT git will save snapshots to disk instead of the delta between the new version to the old version of the same file. Git created other three new files under three new folders We changed the first letter 'a' to letter 'b' Now we edit the a.txt file to see what happens git/objects path and each folder has one file. Please allow me to introduce the other two thingsĪssume we have a file called "a.txt" which contents are ten 'a' letters under git control.Īfter we commit this file, it will create three folders under. In order to explain the term snapshot clear. If you think about Git as a tool for storing and comparing and merging snapshots of your project, it may be easier to understand what is going on and how to do things properly. Then most of the commands work with those manifests to see how they differ or pull content out of them, etc. You tell Git you want to save a snapshot of your project with the git commit command and it basically records a manifest of what all of the files in your project look like at that point. Instead of writing a tool that versions each file individually, like Subversion, we would probably write one that makes it easier to store snapshots of our project without having to copy the whole directory each time. In other version control systems, changes to individual files are tracked and refered to as revisions, but with git you are tracking the entire workspace, so they use the term snapshot to denote the difference. It is the replacement term for "Revision". The term snapshot is used in the git reference site as well
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |