Skip to content

Instantly share code, notes, and snippets.

@nirev
nirev / gist:f367258726baffef6ca5
Last active August 29, 2015 14:02 — forked from malclocke/gist:943565
Delete git remote branches that are merged
# deletes remote branchs that are merged
$ git branch -r --merged |
awk -F'/' '/^ *origin/{if(!match($0, /(>|master|production)/)){print $2}}' |
xargs git push origin --delete