NOTE: The solution presented below (which does not work as expected) was found by searching SO :-)
I want to list all commits of current branch, ignoring merges from other branch, like this:
$ git status
On branch 2021050704
Your branch is up to date with 'origin/2021050704'.
nothing to commit, working tree clean
$ git log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
* 51fa955 2021-05-07 | schema update (HEAD -> 2021050704, origin/2021050704) [xrfang]
|\
| * 5b542c5 2021-05-07 | schema update (origin/2021050703, 2021050703) [xrfang]
|/
* b69d581 2021-05-07 | removed redundant row_format specifier [xrfang]
* 39685bb 2021-05-06 | added collect_invasion series [xrfang]
$ git log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short --no-merges
* 5b542c5 2021-05-07 | schema update (origin/2021050703, 2021050703) [xrfang]
* b69d581 2021-05-07 | removed redundant row_format specifier [xrfang]
* 39685bb 2021-05-06 | added collect_invasion series [xrfang]
Now the problem is, with --no-merge, it get rid of 51fa955
, but what I want is to eliminate 5b542c5
, which is from branch 2021050703
, and my current branch is 2021050704
.