Skip to content

Instantly share code, notes, and snippets.

@yuchan
Last active March 17, 2017 02:23
Show Gist options
  • Save yuchan/022ff418aed47814800686690ee4e9f6 to your computer and use it in GitHub Desktop.
Save yuchan/022ff418aed47814800686690ee4e9f6 to your computer and use it in GitHub Desktop.
#!/bin/bash
git fetch origin --prune
for branch in $(git branch -r --list --merged | grep -v "develop" | grep -v "master" | sed -e 's/[A-z]*\///'); do git push origin :${branch}; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment