Sha256: 54e6c33c6ddfaca66993bd0cd9e3686274766c8673cfedc11cb7ee156a96328f

Contents?: true

Size: 445 Bytes

Versions: 9

Compression:

Stored size: 445 Bytes

Contents

require 'git-utils/command'

class Sync < Command

  def parser
    OptionParser.new do |opts|
      opts.banner = "Usage: git sync"
      opts.on_tail("-h", "--help", "this usage guide") do
        puts opts.to_s; exit 0
      end
    end
  end

  # Returns a command appropriate for executing at the command line
  def cmd
    c = ["git checkout master"]
    c << "git pull"
    c << "git checkout #{current_branch}"
    c.join("\n")
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
git-utils-0.6.2 lib/git-utils/sync.rb
git-utils-0.6.1 lib/git-utils/sync.rb
git-utils-0.6.0 lib/git-utils/sync.rb
git-utils-0.5.10 lib/git-utils/sync.rb
git-utils-0.5.9 lib/git-utils/sync.rb
git-utils-0.5.8 lib/git-utils/sync.rb
git-utils-0.5.7 lib/git-utils/sync.rb
git-utils-0.5.6 lib/git-utils/sync.rb
git-utils-0.5.5 lib/git-utils/sync.rb