Cleaning git branches in 1 command
blog.splice.com
blog.splice.com
The actual title on the blog post is "Cleaning Up Git Branches", which is much more appropriate for an article that uses 5 commands including potentially fragile grepping and regex's to get the job done.
alias gitpurge=" \
git checkout master && \
git remote update --prune | \
git branch -r --merged | \
grep -v master | \
sed -e 's/origin\//:/' | \
xargs git push origin"