简体   繁体   English

如何跟踪特定git commit的合并历史记录?

[英]How can I follow the merge history of a specific git commit?

Recently we deployed a new build to production but when unit tests were ran against it we found that an expected output was not updated. 最近,我们将一个新版本部署到生产中,但是当针对它运行单元测试时,我们发现预期的输出没有更新。 Right now the general theory around the office is that the code was not properly merged from development to QA to production and I've been tasked with determining if that is the case. 现在,围绕办公室的一般理论是,代码没有正确地从开发到质量保证再到生产进行合并,我的任务是确定是否确实如此。

I've been able to isolate the commit to development: 我已经能够隔离对开发的提交:

user@workstation /c/Projects/major-project (master)
$ git log --grep=ABC-1234
commit 33a27eeddffd50fe2ab9ea8ee5eb806ae18102fd
Author: author
Date:   Mon May 19 13:34:49 2014 -0400

    ABC-1234 Updated the output to match new format.

user@workstation /c/Projects/major-project (master)
$

But now that it is there a way I can generate a list of the branches that it has been merged into? 但是,现在有一种方法可以生成已合并到的分支的列表?

Try using git branch with the --contains option, eg: 尝试将git branch--contains选项一起使用,例如:

$ git branch --contains 33a27ee
* master
  development

From the documentation : 文档中

With --contains , shows only the branches that contain the named commit (in other words, the branches whose tip commits are descendants of the named commit). 使用--contains ,仅显示包含命名提交的分支(换句话说,其尖端提交是命名提交的后代的分支)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM