警告:远程HEAD引用了不存在的ref,无法签出.没有发现分支



我正在尝试签出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>

我甚至试过专门签出master分支,但仍然一无所获。

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存储库不会创建master分支。您可以使用git branch -r查找另一个分支,并使用git checkout -b xxx origin/xxx签出远程分支代码。或者尝试git help symbolic-ref获取更多信息。

最新更新