How can I delete all git branches which have been merged? show how to delete branches that have been merged. However, in GitHub, there is now a "Squash and merge" and a "Rebase and merge" option, both of which is not detected by git branch --merged
.
Is there a way to identify all the branches that essentially generates an empty commit if merged into master?
EDIT: looking for a programmatic way via the CLI, similar to the linked question.