Is there any difference between git checkout and git checkout -b

前端 未结 2 388
萌比男神i
萌比男神i 2021-01-28 03:16

I\'m very new to git so I\'m about to make my fist commit, so for this I have created a branch by typing git checkout my_branch .This worked fine. But after I saw i

2条回答
  •  猫巷女王i
    2021-01-28 03:16

    when you run with -b you are telling git to create the branch for you. git checkout without -b requires the branch to exist already to work.

提交回复
热议问题