[英]Git log history simplification, elaborations example in git log's manual
All of you comfortable with example and elaborations in git log's help for history simplification? 大家都对git log帮助简化历史的示例和细节感到满意吗? I encounter some burdens on understanding when using this help/manual and the named example. 使用此帮助/手册和命名示例时,我在理解方面遇到了一些负担。
.-A---M---N---O---P---Q
/ / / / / /
I B C D E Y
\ / / / / /
`-------------' X
- I is the initial commit... foo exists with contents “asdf”, and a file quux exists with contents “quux”.... 我是最初的提交... foo存在,内容为“ asdf”,文件quux存在,内容为“ quux”。
- In A, foo contains just “foo”... 在A中,foo仅包含“ foo” ...
- B contains the same change as A... B包含与A相同的更改...
- C does not change foo, but its merge N changes it to “foobar”... C不会更改foo,但其合并N会将其更改为“ foobar” ...
- P is TREESAME to O... P是TREESAME到O ...
It looks like the terms TREESAME and !TREESAME are to be seen in scope of a single file/directory. 看起来术语TREESAME和!TREESAME在单个文件/目录的范围内可见。 Not to be used to express commit property for multiple files. 不用于表示多个文件的提交属性。 Is this true? 这是真的?
The TREESAME expressions in the description are applied to the trees of each commit (pairwise as they are being compared) after doing any file-specific filtering from your git log
command. 在使用git log
命令执行任何特定于文件的过滤之后 ,描述中的TREESAME表达式将应用于每个提交的树(在比较它们时成对出现)。 For instance: 例如:
git log --simplify-merges
compares every file in each tree to decide whether two commit trees are "the same", while: 比较每个树中的每个文件,以确定两个提交树是否“相同”,而:
git log --simplify-merges -- README
compares only the README
file in each tree, and: 仅比较每棵树中的README
文件,并且:
git log --simplify-merges -- README dir1 dir2
leaves README
and any files within the two directories in the tree before comparing the trees. 在比较树之前,将README
文件和树中两个目录中的所有文件README
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.