Sha256: 13c6c5ede29a7a56c1a01b6f490106cfd6da412c92b95ba1ceb5efe07f54db24

Contents?: true

Size: 457 Bytes

Versions: 1

Compression:

Stored size: 457 Bytes

Contents

module GitFonky
  class Command
    attr_accessor :branch_name

    def initialize(branch_name = nil)
      @branch_name = branch_name
    end

    def current_branch
      `git branch --show-current`.strip
    end

    def fetch_upstream
      `git fetch upstream #{branch_name} 2>&1`
    end

    def pull_upstream
      `git pull upstream #{branch_name} 2>&1`
    end

    def push_to_origin
      `git push origin #{branch_name} 2>&1`
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
git_fonky-0.6.0 lib/git_fonky/command.rb