git checkout -b 本地分支名 origin/远程分支名

  • 第一步 git fetch 先拉取遠端所有分支
  • 第二步 git checkout -b dev origin/dev 切換到遠端分支

如果出现提示: cannot update paths and switch to branch xx at the same time. Did you intend to checkout origin/xx which can not be resolved as commit?
需要先git fetch

相关文章:

  • 2021-11-21
  • 2022-02-08
  • 2022-12-23
  • 2021-11-21
猜你喜欢
  • 2022-02-28
  • 2021-12-03
  • 2021-07-24
  • 2022-02-08
  • 2021-06-17
  • 2022-12-23
  • 2021-12-12
相关资源
相似解决方案