If you're not doing your merges and pulls with --no-ff
having actual merge commits at a branch tip is going to be an unreliable indicator, so if you just don't want to see the merge commits,
git log --no-merges --oneline -n 10 # or --since, or something, might do
If you want to decide how far back to list based on commit attributes rev-list doesn't have as a built-in cutoff criterion it's just a matter of filtering on those attributes in the output of rev-list
or more generally some log --pretty=format:
selection, here's one that lists only the tips from merged branches leading to the selected branch, getting C1-C2-C4 -- since I can't figure out how you decided to bypass C4 ...
#!/bin/sh
git rev-list --parents "${@-HEAD}" \
| sed -n '/^[^ ]* [^ ]* /!q;s///;s/[^ ]*/&^!/gp' \
| xargs git log --oneline
The sed:
/^[^ ]* [^ ]* /!q # quit at first rev with less than two parents
s/// # strip rev and its first parent
s/[^ ]*/&^!/gp # append ^! to all other (merged) revs
and the ^!
suffix tells log
to not automatically include parents.