简体   繁体   English

如何获得两个日期之间对git分支的所有合并提交的列表?

[英]How can I get a list of all merge commits to a git branch between two dates?

We have something bad occurring in our pre-production environments that is very hard to track down. 我们在预生产环境中发生了一些很难找到的不好的事情。 We know that it was first introduced to our develop branch between 2018-07-21 and 2018-07-28. 我们知道它是在2018-07-21和2018-07-28之间首次引入我们的开发部门的。

I would like to go look at all the merge commits to develop between those two dates to examine them for anything that might be causing our problem. 我想看看在这两个日期之间开发的所有合并提交,以检查它们是否可能导致我们的问题。 Preferably, I would like to do this in some visual tool like Git Extensions, but that is not critical. 最好是,我想在一些视觉工具(如Git Extensions)中做到这一点,但这并不重要。

So, I need a list of merge commit hashes to branch "develop" between 2018-07-21 and 2018-07-28, but I don't know how to find that specific list. 因此,我需要在2018-07-21至2018-07-28之间分支“开发”的合并提交哈希列表,但我不知道如何找到该特定列表。

Would this work? 这行得通吗? I'm no expert on git but I think, looking at some examples I've worked with, this should give you what you need: 我不是git的专家,但是我认为,参考一些我曾使用过的示例,这应该可以为您提供所需的信息:

git log --since "JUL 21 2016" --until "JUL 28 2018" --pretty=format:"%H" --merges

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

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