I'd like to create a git command that will delete any branches that have all commits included in the current branch e.g.
$ git branch
groups
* master
$ git cleanup-branches
deleted groups # all commits are included in master
$ git branch
* master
How would I go about creating this?