Reputation: 99398
In command line, how can I check whether a branch has been merged into another branch, and if yes, find out which branch it has been merged into?
Upvotes: 14
Views: 11504
Reputation: 141946
With
--contains
, shows only the branches that contain the named commit (in other words, the branches whose tip commits are descendants of the named commit)
--contains
[]
Only list branches which contain the specified commit (HEAD if not specified)
git branch --contains <commit/tag/branch>
Upvotes: 5
Reputation: 12609
git branch --contains <branch>
will print all local branches where the commit labelled by <branch>
is an ancestor.
Upvotes: 18