Sha256: 296f48b961eda82ae0ffc9ab53cd9aa2416f0a31aef2a59a6b4a11521cfb71da
Contents?: true
Size: 661 Bytes
Versions: 26
Compression:
Stored size: 661 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" HighLine.say "Deleting <%= color('#{remote ? 'remote' : 'local'}', :green) %> branches that have been merged into master" 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
26 entries across 26 versions & 1 rubygems