Skip to content

Instantly share code, notes, and snippets.

Avatar

Malcolm Locke malclocke

  • Christchurch, New Zealand
View GitHub Profile
@malclocke
malclocke / gist:943565
Created Apr 27, 2011 — forked from schacon/gist:942899
delete all remote branches that have already been merged into master
View gist:943565
$ git branch -r --merged |
awk -F'/' '/^ *origin/{if(!match($0, /(>|master)/)){print $2}}' |
xargs git push origin --delete