git-delete-squashed-branches - Man Page
Delete branches that were squashed
Deletes all git branches that have been "squash-merged" into branch-name.
The target branch were the "squashed-merged" branches were committed to. If no value is given, then the current checked out branch will be used.
Delete all branches that were "squash-merged" into the current checked out branch.
$ git delete-squashed-branches
Delete all branches that were "squash-merged" into the main branch. This will checkout the target branch and leave you on said branch after the command has completed.
$ git delete-squashed-branches main
Written by Teddy Katz <email@example.com> and Vladimir Jimenez <firstname.lastname@example.org>
May 2021 Git Extras