git - `git blame/annotate` : terminate on merge commits

标签 git

团队成员之间有一些争论:

  1. 有些人喜欢看到 pull 请求在 merge 前被压缩
  2. 有些人喜欢看到功能开发的提交历史。

作为倾向于第二个阵营的人,我认为第一个阵营的主要反对意见集中在 git blame/git annotate 上,显示所做更改的提交与将更改引入当前分支的提交。

我在 git blame/git annotate 上找不到任何命令行选项可以让它在 merge 到当前分支时停止。

这个问题可以通过回答以下问题来解决:我是否遗漏了一些辅助命令,或者这是我需要提交的功能请求吗?

(更新:同事们也提示用许多 PR 可视化历史是一种痛苦,但我相信有 gitk 的标志等可以解决这个问题)

最佳答案

尽管我承认自己倾向于第二个阵营,但我不知道有什么方法可以通过 git annotate 实现这一点。

因此,要回答您的问题,您可能需要提交功能请求。但是我怀疑它不会被接受,因为根据 the docs ,

this command exists only for backward compatibility to support existing scripts, and provide a more familiar command name for people coming from other SCM systems.

关于git - `git blame/annotate` : terminate on merge commits,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32463183/

相关文章:

git - git rerere 是否自动将文件标记为已解决?

Git 不提交阶段性更改

git - 选择要与 Git 一起使用的私钥

git - 我不能再 git push 到 github : error: RPC failed; curl 55 Send failure: Connection was aborted

git - 增加 Github Enterprise 中 protected `master` 分支的代码覆盖率门

css - Jekyll github pages 站点忽略 .css

java - 为什么要将 Maven 与 Git 结合?

git显示: formatting is changed after redirection to file

git - 如何存储当前更改并将其应用到新分支

git - 如何在 SourceTree 中按文件夹过滤日志?