Sha256: 2dcab7d6cc81922841e76f878d98e0ddc6737a7f163ad67a788510bc6ea2660f
Contents?: true
Size: 539 Bytes
Versions: 13
Compression:
Stored size: 539 Bytes
Contents
#!/usr/bin/env ruby #prune branches that have been merged into master from the repo #usage -r --remote to prune remote branches require File.join(File.dirname(__FILE__), '..', 'lib', 'socialcast-git-extensions.rb') include Socialcast remote = ARGV.delete("--remote") || ARGV.delete("-r") run_cmd "git checkout master" run_cmd "git pull" branches(:merged => true).each do |branch| run_cmd "git branch -d #{branch}" end if remote branches(:merged => true, :remote => true).each do |branch| run_cmd "grb rm #{branch}" end end
Version data entries
13 entries across 13 versions & 1 rubygems