【问题标题】:warning: remote HEAD refers to nonexistent ref, unable to checkout. and no branches found警告:远程 HEAD 引用不存在的 ref,无法结帐。并没有找到分支
【发布时间】:2015-11-02 19:56:33
【问题描述】:

我正在尝试检查 libvpx,但出现以下错误。

sudo git clone http://git.chromium.org/webm/libvpx.git
Initialized empty Git repository in /opt/ffmpeg/sources/libvpx/.git/
warning: remote HEAD refers to nonexistent ref, unable to checkout.
cd libvpx/
git branch -a
<nothing>

我什至尝试专门检查主分支,但仍然没有。

sudo git clone http://git.chromium.org/webm/libvpx.git -b master
Initialized empty Git repository in /opt/ffmpeg/sources/libvpx/.git/
warning: Remote branch master not found in upstream origin, using HEAD instead
warning: remote HEAD refers to nonexistent ref, unable to checkout.

【问题讨论】:

    标签: git libvpx


    【解决方案1】:

    因为远程 git 存储库没有创建 master 分支。您可以使用git branch -r 查看另一个分支,并使用git checkout -b xxx origin/xxx 签出远程分支代码。或尝试git help symbolic-ref 了解更多信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-12-29
      • 2017-05-07
      • 2012-01-14
      • 2014-08-28
      • 2012-07-18
      • 2020-06-11
      • 2014-06-13
      相关资源
      最近更新 更多