Sha256: 01bc62ec8888196e513bf63259565eec0900f15a70bf269334c3407784fedee6

Contents?: true

Size: 354 Bytes

Versions: 5

Compression:

Stored size: 354 Bytes

Contents

module GitHelper
  class CleanBranches
    def execute
      system("git checkout $(git symbolic-ref refs/remotes/origin/HEAD | sed \"s@^refs/remotes/origin/@@\")")
      system("git pull")
      system("git fetch -p")
      system("git branch -vv | grep \"origin/.*: gone]\" | awk '{print \$1}' | grep -v \"*\" | xargs git branch -D")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
git_helper-1.3.1 lib/git_helper/clean_branches.rb
git_helper-1.3.0 lib/git_helper/clean_branches.rb
git_helper-1.2.0 lib/git_helper/clean_branches.rb
git_helper-1.1.1 lib/git_helper/clean_branches.rb
git_helper-1.1.0 lib/git_helper/clean_branches.rb