Created: 2023-11-14 13:10 #git

git log --oneline --graph $(git merge-base master HEAD)^..HEAD master

This command shows the relation between the current head (HEAD), master and their common ancestor. It does the following:

  1. git merge-base master HEAD retrieves the common ancestor between master and HEAD.
  2. git log <options> <common ancestor>^..HEAD logs the commits between the parent of the common ancestor and the HEAD.

References#

  1. git fixup.