【问题标题】:Git log (or rev-list) but only show commits that are in every path for a given rangeGit 日志(或 rev-list)但只显示给定范围内每个路径中的提交
【发布时间】:2022-12-10 17:03:12
【问题描述】:

有没有办法只显示给定范围内每个路径共有的git loggit rev-list提交?例如。对于提交图和从 A 到 AB2 的给定范围,仅显示 AB2、AB 和 A。

* AB2
* AB
|\
| * B2
| * B
* | A2
|/
* A

使用 git log --merges ... 几乎是我所需要的,但即使是合并提交也可能不会出现在每条路径上。

【问题讨论】:

    标签: git


    【解决方案1】:

    过滤提交历史 在项目历史中选择特定提交的一些高级方法如下:

    按金额:git log -3

    按日期:git log --after="2014-7-1" git log --after="2014-7-1" --before="2014-7-4"
    git log --after="yesterday"

    作者:git log --author="John"git log --author="John|Mary"

    通过留言:git log --grep="JRA-224:"

    通过文件:git log -- foo.py bar.py

    按内容:git log -S"Hello, World!"

    按范围:git log --

    git 日志main..feature

    您可以在下面的链接中阅读全文

    https://www.atlassian.com/git/tutorials/git-log#:~:text=The%20most%20basic%20filtering%20option,output%20by%20including%20the%20%2D%20option

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-01-18
      • 2013-11-27
      • 2015-01-13
      • 1970-01-01
      • 2023-02-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多