Skip to content

Instantly share code, notes, and snippets.

@tekkub
tekkub / gist:1203061
Created September 8, 2011 10:02
Git aliases to prune merged branches
[alias]
prunelocal = !sh -c 'git branch -d `git branch --merged | grep -v "^*" | tr -d "\\n"`'
pruneorigin = !sh -c 'git push origin `git branch -r --merged | grep \"^ origin/\" | grep -v "/master$" | sed "s/origin./:/g" | tr -d "\\n"`'