'Show diff between two merges in GIT

I have the next output of my git log:

commit de812cfacf6e38e713068e96e15e50c5 (HEAD -> rc1.11, origin/rc1.11, rc1.10)
Merge: b72b512f7 475d8f391
Author: Pep
Date:   Wed May 4 16:09:29 2022 +0000

Merged in TL-XXX (pull request #713)

A description

Approved-by: Pep



commit 475d8f397d524eb5b7f3ec9252b700e
Author: Pep
Date:   Wed May 4 18:07:17 2022 +0200

A description

commit b72b512f7da4f8e7235690c9c72d689cfd1b6a17 (origin/rc1.10, rc1.9)

So I would like to get the commits and the info between both rc version that are a new branch from my develop branch. Is there any way to get this info using git commands? With git log I get all the info of every commits between all my rc branches, but I need the info between only the last two ones.

Thanks

git


Solution 1:[1]

the commits and the info between both rc version that are a new branch from my develop branch

I think you're asking for the contents of the branch that was merged by that last commit. If so, it's the symmetric difference, as described in git help log:

Another special notation is "..." which is useful for merges. The resulting set of commits is the symmetric difference between the two operands. The following two commands are equivalent:

$ git log A B --not $(git merge-base --all A B)
$ git log A...B

or in your case

$ git log rc1.9...rc1.10

As an aside, it looks weird having release candidate branches, because now origin and your local repo disagree on what commits went into a given RC. I think it's more usual for a release candidate to be a tag, same as for a release.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Useless