Sha256: 72e649e563ae42c64bf154109615b5dea718040d21cce65199a782bc11a260fb

Contents?: true

Size: 701 Bytes

Versions: 29

Compression:

Stored size: 701 Bytes

Contents

require 'thor'
require 'thegarage/gitx'
require 'thegarage/gitx/cli/base_command'

module Thegarage
  module Gitx
    module Cli
      class UpdateCommand < BaseCommand
        desc 'update', 'Update the current branch with latest changes from the remote feature branch and master'
        def update
          say 'Updating '
          say "#{current_branch.name} ", :green
          say "with latest changes from "
          say Thegarage::Gitx::BASE_BRANCH, :green

          run_cmd "git pull origin #{current_branch.name}", :allow_failure => true
          run_cmd "git pull origin #{Thegarage::Gitx::BASE_BRANCH}"
          run_cmd 'git push origin HEAD'
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
thegarage-gitx-2.5.0 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.5.0.beta5 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.5.0.beta4 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.5.0.beta3 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.5.0.beta2 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.5.0.beta1 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.4.2 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.5.0.alpha1 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.4.1 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.4.0 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.4.0.pre1 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.3.0 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.3.0.pre1 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.2.3 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.2.3.pre2 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.2.3.pre1 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.2.2 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.2.1 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.2.0 lib/thegarage/gitx/cli/update_command.rb
thegarage-gitx-2.1.1 lib/thegarage/gitx/cli/update_command.rb