Sha256: 40f87b2cce4d086cf86576f983c56f1e88288377025eac60aa493ab493b1fe9c
Contents?: true
Size: 515 Bytes
Versions: 4
Compression:
Stored size: 515 Bytes
Contents
require 'git-utils/command' class Sync < Command def parser OptionParser.new do |opts| opts.banner = "Usage: git sync [branch]" 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 branch = self.known_options.first || default_branch c = ["git checkout #{branch}"] c << "git pull" c << "git checkout #{current_branch}" c.join("\n") end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
git-utils-2.4.0 | lib/git-utils/sync.rb |
git-utils-2.3.0 | lib/git-utils/sync.rb |
git-utils-2.2.1 | lib/git-utils/sync.rb |
git-utils-2.2.0 | lib/git-utils/sync.rb |