Skip to content

Instantly share code, notes, and snippets.

@nonrational
Last active September 25, 2015 15:29
Show Gist options
  • Save nonrational/790c7626cd6423fba193 to your computer and use it in GitHub Desktop.
Save nonrational/790c7626cd6423fba193 to your computer and use it in GitHub Desktop.
git-prune: delete all local branches that have already been merged into the current branch
#!/usr/bin/env bash
git branch --merged | grep -v " develop\| stage\| master" | grep -v '*' | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment