From a3fd3d0a1f42f244f041e96f329b3309b695551c Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Tue, 4 Dec 2018 06:03:59 -0500 Subject: [PATCH] revision selection: add clarity to explanation of commit parents Expand slightly on precisely which commits are the first and second parents of a merge commit. Signed-off-by: Robert P. J. Day --- book/07-git-tools/sections/revision-selection.asc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/book/07-git-tools/sections/revision-selection.asc b/book/07-git-tools/sections/revision-selection.asc index a021f3663..b5bd1413e 100644 --- a/book/07-git-tools/sections/revision-selection.asc +++ b/book/07-git-tools/sections/revision-selection.asc @@ -227,9 +227,8 @@ $ git show "HEAD^" # OK ==== -You can also specify a number after the `^` – for example, `d921970^2` means ``the second parent of d921970.'' -This syntax is useful only for merge commits, which have more than one parent. -The first parent is the branch you were on when you merged, and the second is the commit on the branch that you merged in: +You can also specify a number after the `^` to identify _which_ parent you want; for example, `d921970^2` means ``the second parent of d921970.'' +This syntax is useful only for merge commits, which have more than one parent -- the _first_ parent of a merge commit is from the branch you were on when you merged (frequently `master`), while the _second_ parent of a merge commit is from the branch that was merged (say, `topic`): [source,console] ----