Skip to content

Instantly share code, notes, and snippets.

@redswallow
Created December 10, 2015 22:16
Show Gist options
  • Save redswallow/9261b1c7986aa2f369a7 to your computer and use it in GitHub Desktop.
Save redswallow/9261b1c7986aa2f369a7 to your computer and use it in GitHub Desktop.
Delete all branches that are already merged into the currently checked out branch
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