We use a monitor in our office to display information about all feature branches on our git repository. One of the reasons for this is so that we know when feature branches are 'obsolete' (i.e. all their commits have been merged to master). We use:
git log --pretty=format:'%cd %s' --no-merges --abbrev-commit -n 1 --date=short master..origin/<branch>
Recently we've been trying to keep a cleaner history by squashing commits when merging features back into master. The downside is that our current method of identifying 'obsolete' branches no longer works.
Is there a git command we can use to figure out if a branch can be safely deleted?