|--question
git clone 下载一个仓库出现一个警告,没有生成相关的代码git
warning: 远程 HEAD 指向一个不存在的引用,没法检出。
warning: remote HEAD refers to nonexistent ref, unable to checkout.spa
|--solution指针
.git目录下.git/refs/heads不存在HEAD指向的文件rem
git branch -a
git checkout remotes/origin/Zoroit
此时,工程目录下有相关代码
git branch
提示
(头指针分离于 origin/Zoro)io
git checkout -b remotes/origin/Zoroast
切换到一个新分支 'remotes/origin/Zoro'
* remotes/origin/Zoroclass
此时, 生成head下载
git branch -m remotes/origin/Zoro master引用
* master 切换到master分支
git branch -a
* master
remotes/origin/Zoro
attention:git help branch(指令名) 查看帮助