git branch --merged master | grep xxx
--contains [<commit>]
Only list branches which contain the specified commit (HEAD if not specified). Implies --list.
--no-contains [<commit>]
Only list branches which don’t contain the specified commit (HEAD if not specified). Implies --list.
--merged [<commit>]
Only list branches whose tips are reachable from the specified commit (HEAD if not specified). Implies --list.
--no-merged [<commit>]
Only list branches whose tips are not reachable from the specified commit (HEAD if not specified). Implies --list.