Skip to content

Instantly share code, notes, and snippets.

@csainty
Forked from schacon/gist:942899
Last active September 7, 2015 07:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csainty/e15f5cb2fbf74c1e0901 to your computer and use it in GitHub Desktop.
Save csainty/e15f5cb2fbf74c1e0901 to your computer and use it in GitHub Desktop.
delete all remote branches that have already been merged into development
$ git branch -r --merged origin/development |
grep origin |
grep -v '>' |
grep -v 'master$' |
grep -v 'development$' |
xargs -L1 |
cut -d"/" -f2- |
xargs git push origin --delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment