Skip to content

Instantly share code, notes, and snippets.

@n3tr
Forked from schacon/gist:942899
Last active January 3, 2016 02:29
Show Gist options
  • Save n3tr/8395947 to your computer and use it in GitHub Desktop.
Save n3tr/8395947 to your computer and use it in GitHub Desktop.
Remove all merged (into develop) remote branches from remote
$ git branch -r --merged |
grep origin |
grep -v '>' |
grep -v develop |
xargs -L1 |
awk '{split($0,a,"origin/"); print a[2]}' |
xargs git push origin --delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment