$ git-rprune --helpRemove old local branches that do not exist in REMOTE any more.With --test, only print which local branches would be deleted.Note: To do this automatically on each fetch / pull:git config --global fetch.prune trueUsage: git-rprune REMOTE [-t|--test|-f|--force] [-?|-h|--help]
git branch -a | grep origin | tr -s ' ' | cut -d '/' -f3 | egrep -v -f /dev/fd/0 <(git branch -a | grep -v origin) | grep branch_prefix_that_I_care_about | xargs git branch -d
# translation# git branch -a | grep origin | tr -s ' ' | cut -d '/' -f3## this finds all remote branch names minus the "remote/origin/" part## <(git branch -a | grep -v origin)## this finds all local branch names and redirects it into the previous command## egrep -v -f /dev/fd/0 STUFF## this is doing some weird magic that I'm grokking as "take the set difference from whatever was piped in"### overall translation: (STUFF TO CONSIDER) | egrep magic <(STUFF TO REMOVE FROM CONSIDERATION) | do cool things with resulting stuff