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

 

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