Skip to content

Instantly share code, notes, and snippets.

@ma3tk
Created February 12, 2016 07:09
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 ma3tk/20354ae3bbbf96529ca9 to your computer and use it in GitHub Desktop.
Save ma3tk/20354ae3bbbf96529ca9 to your computer and use it in GitHub Desktop.
Delete "Merged branches in Remote" with fetch
git fetch --prune; git branch -a --merged | grep -vE '^\*|master$|develop$|release$' | grep remotes/origin | sed -e 's% *remotes/origin/%%' | xargs -I% git push origin :%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment