Path
# File lib/git/branch.rb, line 31 def archive(file, opts = {}) @base.lib.archive(@full, file, opts) end
# File lib/git/branch.rb, line 26 def checkout check_if_create @base.checkout(@full) end
# File lib/git/branch.rb, line 59 def current determine_current end
# File lib/git/branch.rb, line 55 def delete @base.lib.branch_delete(@name) end
# File lib/git/branch.rb, line 17 def gcommit @gcommit ||= @base.gcommit(@full) @gcommit end
g.branch(‘new_branch’).in_branch do
# create new file # do other stuff return true # auto commits and switches back
end
# File lib/git/branch.rb, line 40 def in_branch (message = 'in branch work') old_current = @base.lib.branch_current checkout if yield @base.commit_all(message) else @base.reset_hard end @base.checkout(old_current) end
# File lib/git/branch.rb, line 63 def merge(branch = nil, message = nil) if branch in_branch do @base.merge(branch, message) false end # merge a branch into this one else # merge this branch into the current one @base.merge(@name) end end
Generated with the Darkfish Rdoc Generator 2.