diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 191b8a74..bb211221 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -743,7 +743,7 @@ def branch_delete(branch) def checkout(branch, opts = {}) arr_opts = [] - arr_opts << '-b' if opts[:new_branch] || opts[:b] + arr_opts << "-b #{opts[:new_branch] || opts[:b]}" if opts[:new_branch] || opts[:b] arr_opts << '--force' if opts[:force] || opts[:f] arr_opts << branch