git checkout my_branch vs. git checkout origin/my_branch

前端 未结 2 683
没有蜡笔的小新
没有蜡笔的小新 2021-02-03 22:41

I was on branch1 when I checkout branch2 like this (both branches are existing).

git checkout origin/branch2

then I got a

2条回答
  •  野性不改
    2021-02-03 23:04

    you should use git checkout --track origin/branch2 to create a local branch of branch2, which tracking the remote origin/branch2

提交回复
热议问题