Skip to content

Instantly share code, notes, and snippets.

@rminderhoud
Created January 23, 2014 19:59
Show Gist options
  • Save rminderhoud/8585717 to your computer and use it in GitHub Desktop.
Save rminderhoud/8585717 to your computer and use it in GitHub Desktop.
Delete multiple remote branches
git branch -r | awk -Forigin/ '/PATTERN/ {print $2}' | xargs -I {} git push origin :{}
check which branches going to delete
git branch -r | awk -Forigin/ '/PATTERN/ {print $2}'
Source: http://stackoverflow.com/questions/10555136/delete-multiple-remote-branches-in-git#answer-13974015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment