gpt4 book ai didi

git - 错误 : Trying to write ref HEAD with nonexistant object

转载 作者:行者123 更新时间:2023-12-05 06:46:13 27 4
gpt4 key购买 nike

我正在尝试克隆一个存储库,但不能。这是我得到的:

username@dev:~$ sudo git clone username@localhost:reponame reponame
Initialized empty Git repository in /home/username/reponame/.git/
username@localhost's password:
remote: Counting objects: 1017, done.
remote: Compressing objects: 100% (425/425), done.
remote: Total 1017 (delta 490), reused 967 (delta 467)
Receiving objects: 100% (1017/1017), 18.44 MiB | 26.02 MiB/s, done.
Resolving deltas: 100% (490/490), done.
error: Trying to write ref HEAD with nonexistant object 650847310778421960977df632ede735af9e9b86
fatal: Cannot update the ref 'HEAD'.

Trying to clone a repository in git, getting a error有一些建议,但我没有尝试克隆到现有文件夹 - 我正在尝试克隆到一个新文件夹,显然我无法将远程添加到甚至不是 git 的东西 repo 。

如果我使用不同的用户名,它就可以正常工作。只是不是这个新创建的用户。

有什么想法吗?

最佳答案

听起来好像 HEAD 以某种方式指向一个不存在的对象。你有其他分行吗?如果你这样做会发生什么

git clone -b BRANCH username@localhost:reponame reponame

关于git - 错误 : Trying to write ref HEAD with nonexistant object,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17869358/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com