Github squash-merge PR local cleanup
#!/bin/sh
# Delete local branches whose upstream has been removed
# (useful for Github squashed and merged branches)
# WARNING: git branch -D will force delete branches!
git branch -vv | grep ' gone' | cut -d' ' -f1-3 | xargs -i git branch -D {}