git log历史记录简化,git log手册中的详细示例 [英] Git log history simplification, elaborations example in git log's manual

查看:224
本文介绍了git log历史记录简化,git log手册中的详细示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你们所有人都对git log帮助简化历史的示例和细节感到满意吗? 使用此帮助/手册和命名示例时,我在理解方面遇到了一些负担.

All of you comfortable with example and elaborations in git log's help for history simplification? 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

  • 我是最初的提交... foo存在,内容为"asdf",文件quux存在,内容为"quux" ....
  • 在A中,foo仅包含"foo" ...
  • B包含与A ...相同的更改.
  • C不会更改foo,但其合并N会将其更改为"foobar" ...
  • P是对O的天生……
  • I is the initial commit... foo exists with contents "asdf", and a file quux exists with contents "quux"....
  • In A, foo contains just "foo"...
  • B contains the same change as A...
  • C does not change foo, but its merge N changes it to "foobar"...
  • P is TREESAME to O...

  • 包含任何父母中没有的改变与合并的感觉吗? 请参阅git log帮助中的merge N描述
  • 文件的quux在从O过渡到合并P的过程中经过了一些修改,为什么帮助方面的细化使P相对于O成为树状?
    • The sense of a merge with a change not present in any of its parents included? See merge's N description in git log's help
    • The file's quux undergoes some modifications on the transition from O to merge P, why do the elaborations in help qualify P as treesame against O?
    • 看起来TREESAME和!TREESAME是在单个文件/目录范围内看到的.不用于表示多个文件的提交属性.这是真的吗?

      It looks like the terms TREESAME and !TREESAME are to be seen in scope of a single file/directory. Not to be used to express commit property for multiple files. Is this true?

      推荐答案

      描述中的TREESAME表达式在执行完任何文件后将应用于每个提交的树(在比较它们时成对使用). git log命令进行特定于过滤的操作.例如:

      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. 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
      

      仅比较每棵树中的README文件,并且:

      compares only the README file in each tree, and:

      git log --simplify-merges -- README dir1 dir2
      

      在比较树之前,将README和树中两个目录中的所有文件都删除.

      leaves README and any files within the two directories in the tree before comparing the trees.

      这篇关于git log历史记录简化,git log手册中的详细示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆