lib/grb.rb in jinzhu-grb-0.1.1 vs lib/grb.rb in jinzhu-grb-0.2.0

- old
+ new

@@ -63,11 +63,20 @@ "#{GIT} config branch.#{branch}.merge refs/heads/#{branch}" else "#{GIT} branch --track #{branch} #{origin}/#{branch}" end' ] - } - } + }, + + :track => { + :desc => "=> track branch\ngit track `branch` [--explain]", + :commands => [ + '"#{GIT} fetch #{origin}"', + '"#{GIT} branch --track #{branch} origin/#{branch}"', + '"#{GIT} checkout #{branch}"' + ] + } + } def self.parse(opt) if COMMANDS.keys.include?(opt[:command].to_sym) current_branch,branch,branch_,origin = get_current_branch,opt[:branch],opt[:branch_],ORIGIN