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

前端 未结 11 1052
没有蜡笔的小新
没有蜡笔的小新 2020-12-01 00:50

This seems like a popular error for different causes.

I\'ve got a simple bare git repo called \"kiflea.git\", I clone it like this:

git clone git://k         


        
11条回答
  •  天涯浪人
    2020-12-01 01:08

    If there is no master branch actually available, check the following; If there is a file named 'packed-refs' inside the '.git' folder, open it and you could find all references listed.

    Something like below;

    # pack-refs with: peeled fully-peeled 
    e7cc58650190bd28599d81917f1706445d3c6d8b refs/tags/afw-test-harness-1.5
    ^cfae4f034e82591afdf4e5ed72279297d0eee618
    6afe1bcfa4bd74de8e0c8f64d024e1cc289206df refs/tags/afw-test-harness-2.1
    ^c32f7fa495d4b44652f46c065fcd19c3acd237a6
    72f2e4284dfbf27c82967da096c6664646bbdd19 refs/tags/android-1.6_r1
    ^50992e805e758e2231f28ec2127b57a1a9fd0ddc
    0cbd528cad1cee9556098b62add993fc3b5dcc33 refs/tags/android-1.6_r1.1
    

    Then use;

    git checkout refs/tags/xxxx
    

    Or

    git checkout 'HASH value'
    

    to checkout the required version. Thank you.

提交回复
热议问题