Skip to content

Instantly share code, notes, and snippets.

@bsnape
bsnape / delete-remote-merged-branches
Last active December 18, 2015 23:59 — forked from schacon/gist:942899
delete all remote branches that have already been merged into master
$ git branch -r --merged |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
awk '{split($0,a,"/"); print a[2]}' |
xargs git push origin --delete