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 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ...
随机推荐
- 本地schemeApp扩展
作者:ani_di 版权所有,转载务必保留此链接 http://blog.csdn.net/ani_di 本地schemeApp扩展 iHasApp这个用过的话,大概知道我说的是什么了. scheme ...
- css 分栏高度自动相等
方法2: <div class="ticket_table"> <div class="ticket_l"> <h3>全票& ...
- Jboss AS 7 部署web应用程序时无法初始化spring的bean的解决办法
Jboss AS 7 在部署web应用程序的时候无法初始化spring的bean(在tomcat下边不会出现这个问题) 原因是web应用程序没有导入jboss对spring的支持的jar包 解决方法: ...
- Box2D 一、学习资料(库、pdf)
参考: 在Egret中使用Box2D --- 拉小登 (提供了box2d的ts和dts文件下载,以及egret中第三方库配置教程) Egret中成功集成Box2D --- Egret论坛水友 bo ...
- OneThink生成分类树方法(list_to_tree)使用!
具体方法: Application / Common / Common / function.php 下的 224行: function list_to_tree($list, $pk='id', $ ...
- postgresql----TEMPORARY TABLE和UNLOGGED TABLE
一.TEMPORARY|TEMP TABLE 会话级或事务级的临时表,临时表在会话结束或事物结束自动删除,任何在临时表上创建的索引也会被自动删除.除非用模式修饰的名字引用,否则现有的同名永久表在临时表 ...
- TC/IP协议簇
TCP/IP: 数据链路层:ARP,RARP网络层: IP,ICMP,IGMP传输层:TCP ,UDP,UGP应用层:Telnet,FTP,SMTP,SNMP. OSI:物理层:EIA/TIA-232 ...
- Information:java: Errors occurred while compiling module 'spring'
IntellJ Idea遇到Errors occurred while compiling module的解决方法 - sully2008的专栏 - CSDN博客 https://blog.csdn. ...
- python操作redis详解
https://www.cnblogs.com/koka24/p/5841826.html
- 从零开始写JavaWeb框架(第二章节)
这一章太多了...好累,不想写那么细了,就做一点总结吧. package org.smart4j.chapter2.controller; import java.io.IOException; im ...