Skip to content

Instantly share code, notes, and snippets.

@edeustace
Created December 11, 2014 13:04
Show Gist options
  • Save edeustace/093331ac1773c1a53ada to your computer and use it in GitHub Desktop.
Save edeustace/093331ac1773c1a53ada to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
list = `git branch --merged`
clean = list.split("\n").map{ |k| k.chomp }.delete_if{ |k| k.include? "*" }
clean.each{ |b|
puts "deleting #{b}"
`git branch -D #{b}`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment