git 拉取远程分支报错(fatal: '' is not a commit and a branch '' cannot be created from it)(示例

Posted princesong

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git 拉取远程分支报错(fatal: '' is not a commit and a branch '' cannot be created from it)(示例相关的知识,希望对你有一定的参考价值。

问题描述
从远程git上拉取某一个分支,然后报错,拉取不了这个分支。
拉取分支的命令:

git checkout -b xxx-static-19 origin/xxx-static-19

其中xxx-static-19是分支名。

报错

fatal: ‘origin/xxx-static-19‘ is not a commit and a branch ‘xxx-static-19‘ cannot be created from it

解决
重新拉取数据,git pull ,然后再切回分支








以上是关于git 拉取远程分支报错(fatal: '' is not a commit and a branch '' cannot be created from it)(示例的主要内容,如果未能解决你的问题,请参考以下文章

Git 拉取Gitee仓库报错:“fatal: unable to access ''": Failed to connect to 127.0.0.1 port 1080:

GIT切换远程分支并拉取代码

fatal:'origin' does not appear to be a git repository fatal:Could not read from remote repos

git 开发和规范

git 开发和规范

推送代码分支时出现:fatal: 'origin' does not appear to be a git repository