Skip to content

Instantly share code, notes, and snippets.

@biniama
Created May 9, 2016 09:37
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 biniama/a5b36b2e0b8fd75827ee5c33a7723bc1 to your computer and use it in GitHub Desktop.
Save biniama/a5b36b2e0b8fd75827ee5c33a7723bc1 to your computer and use it in GitHub Desktop.
Delete all remote branches that have already been merged into master
git branch -r --merged |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
cut -d"/" -f2- |
xargs git push origin --delete
#Source: https://gist.github.com/schacon/942899
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment