class BranchingCleaner::GIT
Public Class Methods
branches()
click to toggle source
# File lib/branching_cleaner/git.rb, line 11 def branches `git branch` end
current_branch()
click to toggle source
# File lib/branching_cleaner/git.rb, line 15 def current_branch `git symbolic-ref HEAD 2>/dev/null`.chomp.sub('refs/heads/', '') end
drop_branch(branch)
click to toggle source
# File lib/branching_cleaner/git.rb, line 19 def drop_branch(branch) `git branch -D #{branch}` end
switch_to_master_branch()
click to toggle source
# File lib/branching_cleaner/git.rb, line 7 def switch_to_master_branch `git checkout master` end