I have created a test git project to figure out how should I get the differ logs between two branches.
In most case, we will have such a case: branch master has cherry-picked some commits to master,see below graph:
The "I" commit is cherry-picked to master branch. My expected result of differ logs between master and dbg_feature should be "J" only.
But actually, when I run below command:
git cherry -v master dbg_feature
I will get "I" and "J", the cherry-picked one "I" still list in it:
+ a1915061be2f445d322abc7bfb7d19bbb357b917 I
+ 6486e899e07b6d6f539cbcad10655dcc345f434d J
If I run below command:
git log --oneline --no-merges master..dbg_feature
the output is below:
6486e89 J
a191506 I
If run git rev-list command as below:
git rev-list --oneline --no-merges --cherry-pick --right-only master...dbg_feature
6486e89 J
a191506 I
Result seems the same as git log.
So what's the right command to get the exact differ logs between this two branches?