# File lib/git/lib.rb, line 447 def checkout(branch, opts = {}) arr_opts = [] arr_opts << '-f' if opts[:force] arr_opts << ["-b '#{opts[:new_branch]}'"] if opts[:new_branch] arr_opts << branch.to_s command('checkout', arr_opts) end