无法执行git checkout。面临错误-致命:引用不是树错误正在触发

问题描述 投票:1回答:1

我是github的新手,当我尝试从下面提到的链接中签出初始6.2时,出现了以下错误。

链接:https://github.com/trainindata/deploying-machine-learning-models/commits/master

error :  fatal : reference is not a tree 75b48f55a9b6dd94c40846f5a66c7f217a1f580b

任何人都可以帮助我解决此错误。

github fatal-error git-checkout
1个回答
0
投票

首先尝试克隆,然后检出:它确实起作用:

D:\git\tests>git clone https://github.com/trainindata/deploying-machine-learning-models
Cloning into 'deploying-machine-learning-models'...
remote: Enumerating objects: 538, done.
Receivinremote: Total 538 (delta 0), reused 0 (delta 0), pack-reused 538
Receiving objects: 100% (538/538), 1.33 MiB | 1.25 MiB/s, done.
Resolving deltas: 100% (175/175), done.

D:\git\tests>cd deploying-machine-learning-models

D:\git\tests\deploying-machine-learning-models>git checkout 75b48f55a9b6dd94c40846f5a66c7f217a1f580b
Note: switching to '75b48f55a9b6dd94c40846f5a66c7f217a1f580b'.

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 switching back to a branch.

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

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 75b48f5 Section 6.2 - Initial setup
© www.soinside.com 2019 - 2024. All rights reserved.