git異常:fatal: 'idea-line-2' is not a commit and a branch 'idea-line-2' cannot be created from it

創建分支並且拉去遠程同步分支的過程中出現該異常:

fatal: 'idea-line-02' is not a commit and a branch 'idea-line                                                              -02' cannot be created from it

這個時候其實是因爲沒有將當前分支的代碼和遠程代碼進行拉去同步導致的。

解決思路:

git pull 拉去遠程代碼同步,再做切換:

$ git pull
$ git checkout -b idea-line-02 origin/idea-line-02

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章