Sha256: 0c0637d2717f268bb42d8995410625cfbf58e511849deac8a3667537290186df

Contents?: true

Size: 625 Bytes

Versions: 7

Compression:

Stored size: 625 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 pull
      run_cmd("git pull")
    end

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gitmine-0.2.1 lib/gitmine/git.rb
gitmine-0.2.0 lib/gitmine/git.rb
gitmine-0.1.16 lib/gitmine/git.rb
gitmine-0.1.15 lib/gitmine/git.rb
gitmine-0.1.14 lib/gitmine/git.rb
gitmine-0.1.13 lib/gitmine/git.rb
gitmine-0.1.12 lib/gitmine/git.rb