团队成员之间有一些争论:
- 有些人喜欢看到 pull 请求在 merge 前被压缩
- 有些人喜欢看到功能开发的提交历史。
作为倾向于第二个阵营的人,我认为第一个阵营的主要反对意见集中在 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/