From abcb1453e210beb6de70a69d3501cf842b38636e Mon Sep 17 00:00:00 2001 From: scott Chacon Date: Sun, 11 Nov 2007 12:21:30 -0800 Subject: added branch and checkout functionality --- lib/git/base.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/git/base.rb') diff --git a/lib/git/base.rb b/lib/git/base.rb index 46c75eb..342d535 100644 --- a/lib/git/base.rb +++ b/lib/git/base.rb @@ -124,6 +124,11 @@ module Git Git::Branches.new(self) end + def branch(branch_name = 'master') + Git::Branch.new(self, branch_name) + end + + def lib Git::Lib.new(self) end @@ -162,6 +167,10 @@ module Git opts = {:add_all => true}.merge(opts) self.lib.commit(message, opts) end + + def checkout(branch, opts = {}) + self.lib.checkout(branch, opts) + end # convenience methods -- cgit