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

 

 

Receiving objects: 100% (94615/94615), 240.39 MiB | 23.44 MiB/s, done.
Resolving deltas: 100% (10078/10078), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.

root@ubuntu:/home/ubuntu/# git show-ref 
fatal: not a git repository (or any of the parent directories): .git
root@ubuntu:/home/ubuntu/# cd /
root@ubuntu:/home/ubuntu/# git show-ref 
ba52ebb4eab06a0f6e5ed2a784eb04056ef3a26d refs/remotes/origin/dev
root@ubuntu:/home/ubuntu/# git branch //输出空
root@ubuntu:/home/ubuntu/# 

 

 

oot@ubuntu:/home/ubuntu/# git branch -a
  remotes/origin/dev
  下载代码
root@ubuntu:/home/ubuntu/# git checkout  dev
Checking out files: 100% (88758/88758), done.
Note: checking out 'remotes/origin/dev'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at ba52ebb4e update

 

posted on 2022-01-17 17:02  tycoon3  阅读(334)  评论(0)    收藏  举报

导航