git-trim automatically trims your tracking branches whose upstream branches are merged or stray.
git-trim