Skip to content

Instantly share code, notes, and snippets.

@sava-vidakovic
Created April 14, 2016 09:11
Show Gist options
  • Save sava-vidakovic/b6e50f20e6cc96492e6761cba062e560 to your computer and use it in GitHub Desktop.
Save sava-vidakovic/b6e50f20e6cc96492e6761cba062e560 to your computer and use it in GitHub Desktop.

To 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