git clone时,提示warning: remote HEAD refers to nonexistent ref, unable to checkout
一.环境
发行版:Ubuntu 18.04.1 LTS
代号:bionic
内核版本:4.15.0-30-generic
二.背景
git clone https://source.codeaurora.org/external/qoriq/qoriq-components/openwrt
输入以上命令后出现以下错误:
warning: remote HEAD refers to nonexistent ref, unable to checkout
三.解决
3.1 git show-ref输出以下内容:
26d93b38e8acb69a96614675db70fd082e738c05 refs/remotes/origin/github.lede-project/brcm47xx-lxl
01a8f0e444c9b52f100eff878cc7011fffeddeaf refs/remotes/origin/github.lede-project/lede-17.01
61a59949009993a6b1d634ecbce765b37c4c2560 refs/remotes/origin/github.lede-project/master
05606de1aa5bb84b7f60f2df15368268e4106acc refs/remotes/origin/github.lede-project/openwrt-18.06
09e04e4d113f3d766bf2ca1a8a58d872753d953f refs/remotes/origin/github.qoriq-os/integration
498e4fddb7a713007b32e19a14c44d21583e99bf refs/remotes/origin/integration
fb197e7eaae4a7f33c9f24f922b1f8c2225aa301 refs/tags/OpenWrt-18.02
458fcbd03d040848b4f688917b76773fd2d647fc refs/tags/OpenWrt-18.08
5e419b20de47b518c15ebff8d2370b14c0c4bde1 refs/tags/reboot
69d8988682d88bdf47bd453dd968838b0eb0f8dd refs/tags/v17.01.2
1edb66f5f051b003b0ad5fcc3a08acb9d0700d9e refs/tags/v17.01.3
a0a7b1065cfa073570186958c919b6ed04837d86 refs/tags/v17.01.4
f9d18e2bb1d1e008774b0da99c73625602d33bd5 refs/tags/v17.01.5
ea72e0b1f937357db7b8faec250ecd385e29f138 refs/tags/v17.01.6
d243cf3da5b88a15485cae19c9c2f0b8b9aa5caa refs/tags/v18.06.0
bd01c2d3a34145e4823ae62b99496c9a9b722a57 refs/tags/v18.06.0-rc1
373a8f47ac809b4bb0fdb56cfcdfcbe3bb2fda8e refs/tags/v18.06.0-rc2
b261a1195fca2b8b951203f0f1464d163455b9c3 refs/tags/v18.06.1
从输出的以上内容可以发现,没有类似refs/head/branch_name这样的refs
3.2 git branch -a查看所有分支
remotes/origin/github.lede-project/brcm47xx-lxl
remotes/origin/github.lede-project/lede-17.01
remotes/origin/github.lede-project/master
remotes/origin/github.lede-project/openwrt-18.06
remotes/origin/github.qoriq-os/integration
remotes/origin/integration
3.3 checkout 某个分支,以remotes/origin/github.lede-project/openwrt-18.06为例
git checkout remotes/origin/github.lede-project/openwrt-18.06
3.4 创建分支或切换到指定分支
git checkout -b remotes/origin/github.lede-project/openwrt-18.06
3.5 分支重命名
git branch -m remotes/origin/github.lede-project/openwrt-18.06 openwrt-18.06
3.6 指定想要merge的分支,这样才可以进行git pull操作
git branch --set-upstream-to=origin/openwrt-18.06 openwrt-18.06
git clone时,提示warning: remote HEAD refers to nonexistent ref, unable to checkout的更多相关文章
- warning: remote HEAD refers to nonexistent ref, unable to checkout
今天使用git clone时候 提示 warning: remote HEAD refers to nonexistent ref, unable to checkout 经过测试解决办法如下 git ...
- warning: remote HEAD refers to nonexistent ref, unable to checkout.解决
git branch -r origin/branch origin/hexo git checkout -b hexo origin/hexo
- git clone时提示(gnome-ssh-askpass:29288): Gtk-WARNING **: cannot open display:
一.背景 在服务器上克隆源码 二.解决 unset SSH_ASKPSS
- ssh 远程链接时出现错误提示:WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED
ssh 远程链接时出现错误提示 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST I ...
- Git clone时出现fatal:the remote end hung up unexpectedly
以HTTPS方式进行git clone时出现如下错误: 方法1:增大缓存 git config http.postBuffer 524288000 尝试无效: 方法2:配置git的最低速度和最低速度时 ...
- Git提交时提示‘The file will have its original line endings in your working directory’
Git提交时提示'The file will have its original line endings in your working directory' Git出现错误 git add -A ...
- git clone时加上--depth 1
当项目过大时,git clone时会出现error: RPC failed; HTTP curl The requested URL returned error: Gateway Time-out的 ...
- git clone时出现 error:inflate:data stream error(incorrect data check)
git clone时出现 error:inflate:data stream error(incorrect data check) fatal:serrious inflate inconsiste ...
- ssh连接失败,提示 WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
[root@iZ2ze4kh1rvftq4cevdfjwZ ~]# ssh IP @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ...
随机推荐
- cache buffers chains以及热块解决方案
cache buffers chains以及热块解决方案 今天是2013-10-10,今天下午我调休了,中午饭过后从14点一直睡到16点,这种感觉真爽. 之前学习过关于buffer cache的ca ...
- Android UsageStats:应用根据启动次数、启动时间、应用名称排序
Android 7.1.1 developers/samples/android/system/AppUsageStatistics/Application/src/main/java/com/exa ...
- cocos2dx3.1从零学习(二)菜单、场景切换、场景传值
转:http://www.it165.net/pro/html/201406/16195.html 回顾一下上一篇的内容,我们已经学会了创建一个新的场景scene,添加sprite和label到层中, ...
- 动态设置progressBar的进度
progressDrawable = this.getResources().getDrawable(R.drawable.image); progressDrawable.setBounds(mSe ...
- undo文件丢失或损坏
startup mount cp +DATA/ora11g/datafile/undotbs1.dbf alter database rename file '+DATA/ora11g/datafil ...
- Spring源码学习之BeanFactory体系结构
一.BeanFactory BeanFactory是Spring IOC容器的鼻祖,是IOC容器的基础接口,所有的容器都是从它这里继承实现而来.可见其地位.BeanFactory提供了最基本的IOC容 ...
- Python网络爬虫学习总结
1.检查robots.txt 让爬虫了解爬取该网站时存在哪些限制. 最小化爬虫被封禁的可能,而且还能发现和网站结构相关的线索. 2.检查网站地图(robots.txt文件中发现的Sitemap文件) ...
- MongoDB Windows环境安装及配置( 一)
原文http://www.cnblogs.com/lzrabbit/p/3682510.html MongoDB一般安装 1.首先到官网 (http://www.mongodb.org/downloa ...
- Linux学习-->如何通过Shell脚本实现发送邮件通知功能?
1.安装和配置sendmail 不需要注册公网域名和MX记录(不需要架设公网邮件服务器),通过Linux系统自带的mail命令即可对公网邮箱发送邮件.不过mail命令是依赖sendmail的,所以我们 ...
- SpringData修改和删除操作
SpringData的查询我们已经学完了,我们现在就研究一下SpringData的修改和删除. @Modifying 注解和事务 @Query 与 @Modifying 这两个 annotation一 ...