Skip to content

Instantly share code, notes, and snippets.

@nunosilva800
Forked from schacon/gist:942899
Last active August 29, 2015 14:05
Show Gist options
  • Save nunosilva800/b4803ba508fc9fec7e29 to your computer and use it in GitHub Desktop.
Save nunosilva800/b4803ba508fc9fec7e29 to your computer and use it in GitHub Desktop.
Delete remote branches merged into master
$ git remote prune origin |
git branch -r --merged origin/master |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
cut -d"/" -f2- |
xargs git push origin --delete
@nunosilva800
Copy link
Author

updated with suggestions in https://gist.github.com/schacon/942899

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment