Skip to content

Instantly share code, notes, and snippets.

@wsantos
Created July 28, 2015 21:59
Show Gist options
  • Save wsantos/ef0f3ab3a5dabbfbc2ff to your computer and use it in GitHub Desktop.
Save wsantos/ef0f3ab3a5dabbfbc2ff to your computer and use it in GitHub Desktop.
delete merged branches - remote
git branch -r --merged | ⏎ ✭ ✱ ◼
awk -F'/' '/^ *origin/{if(!match($0, /(>|master)/)){print $2}}' |
xargs git push origin --delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment