In Git, you can refer to the commit before HEAD using the shorthand HEAD~, and two before using HEAD~2, etc.
I have a repository that has a merge commit like the following:
~ specifies the generation, but you can use
^ to specify the parent number, in the case of a merge.
git show HEAD^2
Will show the 2nd parent.
(The distinction is especially subtle since without a numeric argument both
^ show the same thing, the first parent of
HEAD. This is because both
^ default to
1 without a numeric parameter. So they show the first parent (by depth) and the first parent (by breadth) which are of course the same.)