Skip to content

Instantly share code, notes, and snippets.

@nozim
Last active December 9, 2015 03:14
Show Gist options
  • Save nozim/4f0da9b1a01e37f9b0f3 to your computer and use it in GitHub Desktop.
Save nozim/4f0da9b1a01e37f9b0f3 to your computer and use it in GitHub Desktop.
Remove all branches merged to master
# took from here http://stackoverflow.com/questions/6127328/how-can-i-delete-all-git-branches-which-have-been-merged
git branch --merged | grep -v "\*" | grep -v master | grep -v dev | xargs -n 1 git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment