$ ./guess_the_languageGit
Git · hard · #26

Which commit is HEAD^2?

*   77335ab (HEAD -> main) Merge branch 'feat'
|\
| * 7f131f4 (feat) F1
* | 5d11851 M1
|/
* 2398b4f A
  1. 2398b4f
  2. 5d11851
  3. 77335ab
  4. 7f131f4
^2 selects the second parent of a merge, which is the tip of the merged-in branch. HEAD^ (or HEAD~1) would be the first parent, 5d11851.
Play Git ▸