changeset 2292:cd4554e0150e

Review history of merges only.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Sun, 09 Dec 2018 11:58:37 +0200
parents a49f3423eb55
children 5bbcbb898ebb
files git.rst
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/git.rst	Sun Dec 09 11:57:43 2018 +0200
+++ b/git.rst	Sun Dec 09 11:58:37 2018 +0200
@@ -275,6 +275,21 @@
   $ git show $REV
   $ git diff $REV^ $REV
 
+Review merge commit related to specific parent::
+
+  $ git diff $REV^1 $REV
+  $ git diff $REV^2 $REV
+
+  $ git diff HEAD^1 HEAD
+  $ git diff HEAD^2 HEAD
+
+.. note:: ``^1`` is the first parent, ``^2`` is the second parent, and so on.
+
+``git show`` command for merge commits shows only changes from conflicting hunks. It is equivalent
+to (lines that changed as part of the conflict resolution)::
+
+  $ git diff-tree --cc $REV
+
 Review difference between commits::
 
   $ git $REV1 $REV2
@@ -286,6 +301,10 @@
   $ git log -p
   $ git log -p $FROM_REV
 
+Review history of merges only::
+
+  $ git log --min-parents=2 -p --cc
+
 View unpublished git commits / analog of git 'hg outgoing'
 ==========================================================