Class: GitHelper::CleanBranches
- Inherits:
-
Object
- Object
- GitHelper::CleanBranches
- Defined in:
- lib/git_helper/clean_branches.rb
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
3 4 5 6 7 8 |
# File 'lib/git_helper/clean_branches.rb', line 3 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 |