Skip to content

Instantly share code, notes, and snippets.

@davejlong
Created June 4, 2014 14:52
Show Gist options
  • Save davejlong/50afa29ce7b1fca372e3 to your computer and use it in GitHub Desktop.
Save davejlong/50afa29ce7b1fca372e3 to your computer and use it in GitHub Desktop.
Remove all feature and hotfix branches from local repo
`git branch -l`
.split("\n").map { |branch| branch.strip }
.select { |branch| branch[/(feature|hotfix)\//] }
.each { |branch| `git branch -d #{branch}` }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment