Sha256: 2479cb50aa0d980653034e5b6e214aecc4813f8308803fbae42bd24bfb615bba

Contents?: true

Size: 577 Bytes

Versions: 6

Compression:

Stored size: 577 Bytes

Contents

class Gitmine::Git
  class << self
    # Return output of 'git branch'
    def local_branches
      `git branch`
    end

    # Return output of 'git branch -r'
    def remote_branches
      `git branch -r`
    end

    # Run 'git fetch'
    def fetch
      run_cmd("git fetch")
    end

    def checkout(branch)
      run_cmd("git checkout #{branch}")
    end

    def merge(branch)
      run_cmd("git merge #{branch}")
    end

    def push
      run_cmd("git push")
    end

    def delete_remote_branch(branch)
      run_cmd("git push origin :#{branch}")
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gitmine-0.1.11 lib/gitmine/git.rb
gitmine-0.1.10 lib/gitmine/git.rb
gitmine-0.1.9 lib/gitmine/git.rb
gitmine-0.1.8 lib/gitmine/git.rb
gitmine-0.1.7 lib/gitmine/git.rb
gitmine-0.1.6 lib/gitmine/git.rb