远程git仓库版本检测失败

异常报告 · 190 次浏览
night_lye 创建于 2023-09-18 11:29

调试文件:https://temp.getquicker.net/119438/d08ce1f13f5e4749bfaeda6c00938c97.html

事情发生在一次断电重启之后,此前能正常运行,重启后就无法检测了。然后设置是没更改过的。比较离谱的是git能备份能推送到仓库,但检测失败了


回复内容
风未知 2023-09-18 12:55
#1

是 git 的问题,你可以根据以下日志排查:


首先是命令 git fetch origin 报错:

fatal: bad object refs/remotes/origin/main

error: github.com:nightlye/supermemo-backup.git did not send all necessary objects


然后是命令 git log remotes/origin/main --pretty=format:"%ai" -1 报错:

warning: ignoring broken ref refs/remotes/origin/main

warning: ignoring broken ref refs/remotes/origin/main

fatal: ambiguous argument 'remotes/origin/main': unknown revision or path not in the working tree.

Use '--' to separate paths from revisions, like this:

'git <command> [<revision>...] -- [<file>...]'


git 就是太精细了,很容易出各种各样的问题,我也没有遇到过,你只能自己折腾了。

night_lye 回复 风未知 2023-09-18 17:29 :

还好能提交,我先提交然后删除重新克隆了,现在没问题了。

回复主贴