如何检查合并提交是否包含手动更改(例如已解决的冲突)? [英] How to check if a merge commit contains manual changes (e.g. resolved conflicts)?
问题描述
如何合并分支机构时是否存在冲突,并且该人必须做什么才能解决这些冲突?
How can I find out if there were conflicts when merging a branch and what shenanigans did the person have to do to resolve those conflicts?
git log -p
似乎对所有合并提交都显示空的差异,无论它们是否具有手动更改.
git log -p
seems to show empty diffs for all merge commits, regardless whether they have manual changes or not.
推荐答案
git show
生成 组合差异 进行合并默认情况下提交,它将仅包含在冲突解决过程中更改的行.
git show
produces a combined diff for a merge commit by default, which will contain only the lines that changed as part of the conflict resolution.
git show <merge_commit_sha1>
git log
采用--cc
选项为合并提交生成组合的差异.例如,要查找所有具有手动更改的合并提交,可以使用:
git log
takes the --cc
option to produce combined diffs for merge commits. For example, to find all merge commits with manual changes you can use:
git log -p --cc --min-parents=2
,然后查找带有差异的提交.
and look for commits with diffs.
这篇关于如何检查合并提交是否包含手动更改(例如已解决的冲突)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!