git log --merges --first-parent -- <file>
將向您顯示提交,該更改合併到特定文件的更改中。由於您使用PR來合併文件,因此這可能就足夠了。
如果不是這種情況,但是,您有其他合併提交對不屬於公關的主線,則可能需要使用--author=<pattern>
,--committer=<pattern>
和--grep=<pattern>
標誌的組合,以進一步過濾輸出:
--author=<pattern>, --committer=<pattern>
Limit the commits output to ones with author/committer header lines that match
the specified pattern (regular expression). With more than one
--author=<pattern>, commits whose author matches any of the given patterns are
chosen (similarly for multiple --committer=<pattern>).
--grep=<pattern>
Limit the commits output to ones with log message that matches the specified
pattern (regular expression). With more than one --grep=<pattern>, commits whose
message matches any of the given patterns are chosen (but see --all-match).
When --show-notes is in effect, the message from the notes is matched as if it
were part of the log message.
http://stackoverflow.com/a/26870440/4280359 –