$ git checkout -b dev2 origin/dev2
fatal: ‘origin/dev2’ is not a commit and a branch ‘dev2’ cannot be created from it
分析:这样证明本地分支没有跟远程分支连接连接
解决:使用git fetch 更新remote索引
验证:使用git branch -a 可以查看到远程分支
然后再执行git checkout -b dev2 origin/dev2就可以了
$ git checkout -b dev2 origin/dev2
fatal: ‘origin/dev2’ is not a commit and a branch ‘dev2’ cannot be created from it
分析:这样证明本地分支没有跟远程分支连接连接
解决:使用git fetch 更新remote索引
验证:使用git branch -a 可以查看到远程分支
然后再执行git checkout -b dev2 origin/dev2就可以了