I have a reasonably tidy Git history, with feature branches merging into the main branch. This can be seen in the results to git log --graph --oneline
:
* f8b3a40 (HEAD -> main, upstream/main) Feature baz
|\
| * 5044a90 baz2
| * fa0c768 baz1
|/
* 5485e88 Feature bar
|\
| * f10992d bar5
| * 72c6f1b bar4
| * 05f902b bar3
| * 3d32bb6 bar2
| * a8274c6 bar1
|/
* 2449d02 Feature foo
|\
| * 437e321 foo6
| * 5e7af85 foo5
| * 5babacb foo4
| * a66ec89 foo3
So I can get a nice summary with git log --first-parent --oneline
:
f8b3a40 (HEAD -> main, upstream/main) Feature baz
5485e88 Feature bar
2449d02 Feature foo
7e68bab Feature fizzbuzz
Now I want to review the changes between foo and bar. git diff 5485e88..2449d02
works as expected, I can see all the code changes. But git log 5485e88..2449d02
is empty. I am expecting something like:
commit 5485e88
Author: Jimmy Weasel <jimmy@example.com>
Date: Wed Mar 22 15:49:53 2023 +0000
Feature bar...
commit f10992d
Author: Jimmy Weasel <jimmy@example.com>
Date: Wed Mar 22 15:25:03 2023 +0000
bar5...
commit 72c6f1b
Author: Jimmy Weasel <jimmy@example.com>
Date: Wed Mar 22 15:22:01 2023 +0000
bar4...
How can I achieve that, given only the values from the --first-parent
output?