warning: remote HEAD refers to nonexistent ref, unable to checkout.

在clone项目的时候出现如下警告信息:
warning: remote HEAD refers to nonexistent ref, unable to checkout.

在这里插入图片描述

项目目录clone下来了,但是点进去什么文件也没有,说明你的项目地址没有master分支。

可以用 git branch -a 查看远程仓库的分支有哪些?
在这里插入图片描述
切换到Branch_stable-it分支,项目就有代码了。
git checkout Branch_stable-it


【注】如果 git branch -a 不显示分支,则可参考 git clone非master分支代码

发布了79 篇原创文章 · 获赞 55 · 访问量 32万+

猜你喜欢

转载自blog.csdn.net/qq_33833327/article/details/103593799