I am working on a fork of a repository. I send pull requests from branches of that fork and they get "Squash and Merged" into the master branch of the upstream repository once they are accepted. How can I automatically find and delete local branches that have already been squashed and merged? Most strategies shown in other solutions rely on determining whether all commits in a branch can be found in master's commit history, but since all my commits are squashed this condition is never met.
More Info
My git remote -v looks like:
origin git@github.com:sshleifer/transformers_fork.git (fetch)
origin git@github.com:sshleifer/transformers_fork.git (push)
upstream git@github.com:huggingface/transformers.git (fetch)
upstream git@github.com:huggingface/transformers.git (push)