Reputation: 272
I have an faulty Git branch (let's name it Branch-E) that has been merged to master. While I've already had that resolved, I need to know, is there a way to list all the other branches in which this branch has been merged into?
I know I can do this to all suspected branches one by one:
git checkout Branch-A
git branch --merged Branch-A -r
which shows all branches merged into Branch-A. But I need to know if there's a way to list ALL remote branches affected by the erroneous Branch-E. Kind of like the other way around. Take note that I'm looking for a list of branches that contain another branch, not a particular commit. Thank you.
Upvotes: 1
Views: 46
Reputation: 272
Found the answer after using better wording on my Google search:
git branch --contains <branch name> -r
Upvotes: 1