git checkout远端到本地分支(拉取远端分支)

xiaoxiao2021-02-28  25

$ git checkout -b ocata dev_ljfatal: 'dev_lj' is not a commit and a branch 'ocata' cannot be created from it

$ git checkout -b ocata origin/dev_lj

Switched to a new branch 'ocata'

Branch 'ocata' set up to track remote branch 'dev_lj' from 'origin'.

注意要添加origin/dev_lj不是dev_lj

指定具体的远端主机为 origin

git clone克隆下来

默认只是远端的master分支克隆到本地

转载请注明原文地址: https://www.6miu.com/read-2626423.html

最新回复(0)