Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git fsck——full没有问题,但可以';不要向上游推进_Git - Fatal编程技术网

git fsck——full没有问题,但可以';不要向上游推进

git fsck——full没有问题,但可以';不要向上游推进,git,Git,我有一个大约7000个文件的项目,我正在尝试添加其中的4000个文件,并提交给上游的初始推送 运行 git fsck --full 返回时没有错误 但是当我做一个 git push -u origin master 或 我犯了这样的错误 fatal: loose object 890b67d9a81c0061176d5a9a061cc6437eac283d (stored in .git/objects/89/0b67d9a81c0061176d5a9a061cc6437eac283d)

我有一个大约7000个文件的项目,我正在尝试添加其中的4000个文件,并提交给上游的初始推送

运行

 git fsck --full 
返回时没有错误 但是当我做一个

git push -u origin master

我犯了这样的错误

fatal: loose object 890b67d9a81c0061176d5a9a061cc6437eac283d (stored in .git/objects/89/0b67d9a81c0061176d5a9a061cc6437eac283d) is corrupt
error: failed to push some refs to 'ssh://git@xxxxxxx'
疯狂的是每次我运行push命令时引用的松散对象都是不同的

非常非常偶尔,它实际上会开始将对象推到上游,然后在消息中途失败

Counting objects: 4551, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4168/4168), done.
fatal: loose object c839cf225383c94e4bb2234fca9f9b8b2d645cde (stored in .git/objects/c8/39cf225383c94e4bb2234fca9f9b8b2d645cde) is corrupt
fatal: early EOF
error: failed to push some refs to 'ssh://git@xxxxxxxx'
我不知所措。可能是:

  • 权限问题(ACL对
    .git/object/…
    的限制太严格)
  • 句柄问题(
    .git/objects/c8/39cf225383c94e4bb2234fca9f9b8b2d645cde
    不知何故已被另一个进程锁定)
  • 损坏问题(在这种情况下,您需要检查该文件是否存在于另一个分支中(或仅在
    主机上可读),并将其复制到
    .git/objects/c8
Counting objects: 4551, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4168/4168), done.
fatal: loose object c839cf225383c94e4bb2234fca9f9b8b2d645cde (stored in .git/objects/c8/39cf225383c94e4bb2234fca9f9b8b2d645cde) is corrupt
fatal: early EOF
error: failed to push some refs to 'ssh://git@xxxxxxxx'