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

Version Path
socialcast-git-extensions-1.4.0 bin/git-prune-merged
socialcast-git-extensions-1.3.2 bin/git-prune-merged
socialcast-git-extensions-1.3.1 bin/git-prune-merged
socialcast-git-extensions-1.3.0 bin/git-prune-merged
socialcast-git-extensions-1.2.0 bin/git-prune-merged
socialcast-git-extensions-1.1.0 bin/git-prune-merged
socialcast-git-extensions-1.0.0 bin/git-prune-merged
socialcast-git-extensions-0.12.2 bin/git-prune-merged
socialcast-git-extensions-0.12.1 bin/git-prune-merged
socialcast-git-extensions-0.12.0 bin/git-prune-merged
socialcast-git-extensions-0.11.2 bin/git-prune-merged
socialcast-git-extensions-0.11.1 bin/git-prune-merged
socialcast-git-extensions-0.11.0 bin/git-prune-merged