Skip to content

Instantly share code, notes, and snippets.

@ygit
Created December 1, 2017 07:12
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 ygit/3e4732a02107f821694d80b72f13e4f7 to your computer and use it in GitHub Desktop.
Save ygit/3e4732a02107f821694d80b72f13e4f7 to your computer and use it in GitHub Desktop.
Delete multiple remote branches in git
git branch -r | awk -F/ '/\/PREFIX/{print $2}'
git branch -r | awk -F/ '/\/PREFIX/{print $2}' | xargs -I {} git push origin :{}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment