“Cannot update paths and switch to branch at the same time”

前端 未结 11 1681
广开言路
广开言路 2020-12-02 04:24

I sometimes use the checkout -b option to create a new branch, check it out at the same time and set up tracking in one command.

In a new environment, I

11条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 05:14

    It causes by that your local branch doesn't track remote branch. As ssasi said,you need use these commands:

    git remote update
    git fetch
    git checkout -b branch_nameA origin/branch_nameB
    

    I solved my problem just now....

提交回复
热议问题