Which commits are on branch B, but not on branch A?
$ git log --oneline A..B
Which commits are not reachable from both A and B? (Symmetric difference)
$ git log --oneline A...B
Of the commits on branch B, but not on branch A, are any of them equivalent to a commit on branch A? (equivalent commits will have -
prefix, new commits will have +
prefix):
$ git cherry -v A B
Take note of ours branch HEAD before the merge: 1d53e49c057b1c990dc9b91406753c3aa2a8ab7a
$ git bisect start
$ git bisect bad
$ git bisect good 1d53e49c057b1c990dc9b91406753c3aa2a8ab7a
This will pick a commit half-way through the merge, but remember this is just checking out that specific commit, so it will go to a point of history from upstream, and will not contain the changes in ours.
To get ours change back, merge the current bisect-chosen commit to ours branch HEAD:
$ git merge --no-commit 1d53e49c057b1c990dc9b91406753c3aa2a8ab7a
Now you will have ours changes back and you can compile and test. In other words, this is the state of ours if you had merged upstream at the current chosen bisected commit.
Before you tell git bisect whether this one is good or bad, reset back:
$ git reset --hard
Then mark it good or bad based on your testing:
$ git bisect bad
And so on!