简体   繁体   English

Git指针和斑点

[英]Git Pointers and blobs

I'm new to distributed version control and i understand that unchanged files in git commits aren't blobbed, but are simply stored as pointers to the last changed file, 我是分布式版本控制的新手,我了解到git commit中未更改的文件不会被大量填充,而只是作为指向最后更改的文件的指针存储,

but... 但...

Does the pointer point to the last commit, or to the last commit where the file was changed? 指针指向最后提交还是指向文件更改的最后提交?

Ie if i have 10 commits, but index.html hasn't changed since the first commit, does the pointer in commit 10 point to the file in the first commit, or does it point to the pointer in commit 9, which points to commit 8 etc etc. 即如果我有10次提交,但是自第一次提交以来index.html尚未更改,提交10中的指针是否指向第一次提交中的文件,还是指向提交9中的指针(指向提交) 8等

It points to the file (blob) itself, without going through another commit. 它指向文件(blob)本身,而无需进行另一次提交。 The linkage is like this: commit -> tree -> (tree ...) -> blob. 链接是这样的:commit-> tree->(tree ...)-> blob。

我在这里写了更多细节

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM