Skip to content

Instantly share code, notes, and snippets.

@ScotterC
Created August 5, 2015 19:10
Show Gist options
  • Save ScotterC/809642c119e0f2c4c367 to your computer and use it in GitHub Desktop.
Save ScotterC/809642c119e0f2c4c367 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
for branch in `git checkout --quiet master && git branch -r --merged | grep origin/ | sed 's/origin\///' | sed '1d;$d' | grep --invert-match master`; do echo -e `git push origin --delete $branch` \\t$branch; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment