Skip to content

Instantly share code, notes, and snippets.

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 necojackarc/144e0bbcadf11bed711ef2033e0b76bb to your computer and use it in GitHub Desktop.
Save necojackarc/144e0bbcadf11bed711ef2033e0b76bb to your computer and use it in GitHub Desktop.

Easy to check which branches will be deleted by removing at the bottom of | sh :)

git branch -r --merged master | sed -e 's#origin/#:#g' | egrep -v 'master|release|ADD BRANCH NAMES YOU WANT TO LEAVE' | sed 's/^/git push origin'/g | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment