The flag --merges makes sure that only merge commits are included.--pretty-format:"%b" will limit the output from git log to only include the body of the merge commit. So given the following merge commit: