From d94f93c3ef3f60d1132fca8c2119a99369e89831 Mon Sep 17 00:00:00 2001 From: LItterBoy-GB <1418377085@qq.com> Date: Tue, 2 Feb 2021 17:41:15 +0800 Subject: [PATCH] Update lib.rb fix checkout branch from remote --- lib/git/lib.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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