Skip to content

Commit d94f93c

Browse files
authored
Update lib.rb
fix checkout branch from remote
1 parent e2fd4af commit d94f93c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/git/lib.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ def branch_delete(branch)
743743

744744
def checkout(branch, opts = {})
745745
arr_opts = []
746-
arr_opts << '-b' if opts[:new_branch] || opts[:b]
746+
arr_opts << "-b #{opts[:new_branch] || opts[:b]}" if opts[:new_branch] || opts[:b]
747747
arr_opts << '--force' if opts[:force] || opts[:f]
748748
arr_opts << branch
749749

0 commit comments

Comments
 (0)