Our development process involves using git feature branches and code reviews done through github. It’s working pretty well for us. The one downside is that we’re doing cleanup manually.
I’m familiar with git-unmerged (http://mutuallyhuman.com/blog/2009/07/02/finding-unmerged-commits-with-git-unmerged) and the built-in git cherry to find branches with unmerged changes.
I’m wondering if anyone has a tool that does the opposite of them. e.g. list branches that have no unmerged changes and are, thus, safe to delete. Or maybe an option on push that won’t delete if unmerged changes are found? (didn’t see one in the docs)
You can use the –no-merged argument to git branch:
If < commit > is omitted, HEAD is assumed.