一.环境

发行版: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的更多相关文章

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

    今天使用git clone时候 提示 warning: remote HEAD refers to nonexistent ref, unable to checkout 经过测试解决办法如下 git ...

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

    git branch -r origin/branch origin/hexo git checkout -b hexo origin/hexo

  3. git clone时提示(gnome-ssh-askpass:29288): Gtk-WARNING **: cannot open display:

    一.背景 在服务器上克隆源码 二.解决 unset SSH_ASKPSS

  4. ssh 远程链接时出现错误提示:WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED

    ssh 远程链接时出现错误提示 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST I ...

  5. Git clone时出现fatal:the remote end hung up unexpectedly

    以HTTPS方式进行git clone时出现如下错误: 方法1:增大缓存 git config http.postBuffer 524288000 尝试无效: 方法2:配置git的最低速度和最低速度时 ...

  6. 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 ...

  7. git clone时加上--depth 1

    当项目过大时,git clone时会出现error: RPC failed; HTTP curl The requested URL returned error: Gateway Time-out的 ...

  8. git clone时出现 error:inflate:data stream error(incorrect data check)

    git clone时出现 error:inflate:data stream error(incorrect data check) fatal:serrious inflate inconsiste ...

  9. ssh连接失败,提示 WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

    [root@iZ2ze4kh1rvftq4cevdfjwZ ~]# ssh IP @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ...

随机推荐

  1. css3 - 字体图标库使用方法

    一些字体图标库的网站 https://icomoon.io/app/#/selecthttp://www.iconfont.cn/http://www.bootcss.com/ http://www. ...

  2. hihocoder [Offer收割]编程练习赛14 可疑的记录

    题目3 : 可疑的记录 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi有一棵N个节点的树,编号1-N,其中1号节点是整棵树的根.他把这棵树的N-1条边记录成N-1 ...

  3. Egret5.2.2 微信小游戏行的示例排行榜

    Egret5.2.2版本发布微信小游戏后,在开放数据域有一个默认排行榜.这个文件夹代码+图大小就22kb. 排行榜的效果就是示范用的,很丑...带翻页. 代码如下,基本就是使用canvas渲染了一个排 ...

  4. Windows Phone 独立存储查看器

    1.为了查看我们存放在独立存储的数据,我们需要借助独立存储查看器. 2.简单介绍下,IsoStoreSpy 下载地址:http://download.csdn.net/download/lhb1097 ...

  5. java如何发起https请求

    1.写一个SSLClient类,继承至HttpClient import java.security.cert.CertificateException; import java.security.c ...

  6. windows 10激活

    1.安装Microsoft Toolkit 解压,安装 2.打开Microsoft Toolkit软件 点击下面红色框框 等到出现下面内容后,继续下一步 3.点击下面按钮 等待片刻后,出现下面结果,就 ...

  7. 170713、springboot编程之多数据源切换

    我们在开发过程中可能需要用到多个数据源,我们有一个项目(MySQL)就是和别的项目(SQL Server)混合使用了.其中SQL Server是别的公司开发的,有些基本数据需要从他们平台进行调取,那么 ...

  8. flask中secret_key的作用

    https://segmentfault.com/q/1010000007295395

  9. socketserver源码解析和协程版socketserver

    来,贴上一段代码让你仰慕一下欧socketserver的魅力,看欧怎么完美实现多并发的魅力 client import socket ip_port = ('127.0.0.1',8009) sk = ...

  10. Python开发【Tornado】:异步Web服务(一)

    异步Web服务 前言: 到目前为止,我们已经看到了许多使Tornado成为一个Web应用强有力框架的功能.它的简单性.易用性和便捷性使其有足够的理由成为许多Web项目的不错的选择.然而,Tornado ...