Show all branches that commit A are on, but commit B is not on?

I have several branches and I found a commit A that introduced an error into the system. Subsequently, this was fixed by fixing B on one of the branches and merged back to the master, but at that time it was not selected cherry for all offensive branches.

I was wondering if there is a team that will show all offensive branches that commit A but don't have a commit B?

I used the following to determine that a commit exists on a branch

$ git branch -r --contains=A 

but I want to try and add to this to include something like

 $ git branch -r --contains=A ^--contains=B 

As a side note that I checked, there are no other commits that contain the same change, i.e. it was not selected by cherry on any other branches, but some branches commit B, where they deviate from the main one, since they are merge, and some are not where they already existed before bit B was entered.

In addition, the ability to check multiple commits will be useful where the commit that fixed the problem (in this case commit B), cherry is selected on several branches that already have different SHA commands.

+7
git branch
source share
1 answer

Have you tried this:

 diff <(git branch -r --contains=A) <(git branch -r --contains=B) 

This is far from ideal, but it can help.

+3
source share

All Articles