Check if the commit is merged with another branch, and if so, what is the merge?
There's a tool out there called git-when-merged
that was developed for exactly this use case. After installing it
git when-merged commitA master
must do the trick.
source to share
In your example, the branch is test
now in commit commitA
. So, you can check where commitA
was merged in master
with this command:
git branch --contains test
This list should list all branches containing commitA
, check if it is listed master
.
To get the SHA commitA
enter:
git rev-parse test
SHA commit and merge itself commitA
.
source to share