How to “git show” a merge commit with combined diff output even when every changed file agrees with one of the parents?

前端 未结 11 662
旧时难觅i
旧时难觅i 2020-11-28 01:15

After doing a \"simple\" merge (one without conflicts), git show usually only shows something like

commit 0e1329e551a5700614a2a34d8101e92fd9f2ca         


        
11条回答
  •  一个人的身影
    2020-11-28 01:28

    Seems like answered here: https://public-inbox.org/git/7vd392ezhx.fsf@alter.siamese.dyndns.org/

    So in a similar way, running

    $ git diff --cc $M $M^1 $M^2 $(git merge-base $M^1 $M^2)

    should show a combined patch that explains the state at $M relative to the states recorded in its parents and the merge base.

提交回复
热议问题