zhc@hongchangfirst$ git checkout -b hongchangfirst origin/hongchangfirst
出現:
fatal: Cannot update paths and switch to branch 'hongchangfirst' at the same time.
Did you intend to checkout 'hongchangfirst' which can not be resolved as commit?
然后我們執行命令:
git branch -a
里邊並不包含遠程都hongchangfirst分支。
遠程倉庫明明有hongchangfirst分支,可是為什么告訴沒有呢?
原來這條命令並沒有每一次都從遠程更新倉庫信息,這樣子做是為了效率,我們可以手動更新一下:
git fetch origin
然后我們在git branch -a
發現了我們都遠程分支,然后我們在做新建一個分支:
git checkout -b hongchangfirst origin/hongchangfirst