Skip to content

Instantly share code, notes, and snippets.

@Kallin
Created February 27, 2015 17:14
Show Gist options
  • Save Kallin/25a994724fccf0b33314 to your computer and use it in GitHub Desktop.
Save Kallin/25a994724fccf0b33314 to your computer and use it in GitHub Desktop.
delete selected branches in ruby
delete_branches = [
'branch_a',
'branch_b',
'branch_c',
]
delete_branches.each do |branch|
system "git branch -D #{branch}"
system "git push origin --delete #{branch}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment