$ cat git.notes # delete all local versions of branches deleted on remote origin $ git branch | grep -vE $(git branch -r | sed 's#.*origin/##' | paste -s -d"|") | xargs git branch -D
$ cat git.notes # delete all local versions of branches deleted on remote origin $ git branch | grep -vE $(git branch -r | sed 's#.*origin/##' | paste -s -d"|") | xargs git branch -D