当我做了一个大的提交时,Git仓库被破坏:“远程端可能的仓库损坏” [英] Git repository gets corrupted when I do a large commit: "Possible repository corruption on the remote side"

查看:4955
本文介绍了当我做了一个大的提交时,Git仓库被破坏:“远程端可能的仓库损坏”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一位朋友和我一直在尝试将git用于一个项目。它被托管在他的服务器上,我将它克隆为:

A friend of mine and I have been trying to use git for a project. It is hosted on his server, and I git clone it as:

git clone username@IP.ADD.RE.SS:/path/to/git/repos.git

漂亮标准的东西, 。但每次我们中的一个人都添加了一个大型的提交(git据说处理得非常好),大约100MB左右,git存储库就会被破坏。基本上,在这一点上,我将能够推动新的变化并拉动其他变化(我认为),但是当我尝试使用上面的命令在新的位置克隆存储库时,出现一条错误消息:

Pretty standard stuff, and it works great for a while. But every time one of us has added a large commit (which git supposedly handles very well), of the order of 100MB or so, the git repository gets kind of broken. Basically, at this point I will be able to push new changes and pull other changes (I think), but when I try to clone the repository in a fresh location using that command above, I get an error message that says:

$git clone username@IP.ADD.RE.SS:/path/to/git/repos.git
Initialized empty Git repository in /local/path/to/repos/.git/
remote: Counting objects: 1455, done.
remote: Compressing objects: 100% (1235/1235), done.
error: git upload-pack: git-pack-objects died with error.s   
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed

发生了这种情况现在是3或4次,而且我总是添加一个大的提交。任何想法为什么发生这种情况?我们如何解决它?我们都使用Mac OSX Snow Leopard。

This has happened 3 or 4 times now, and it's always when I add a large commit. Any idea why this is happening? How can we fix it? We're both using Mac OSX Snow Leopard.

谢谢!
-M

Thanks! -M

推荐答案

这里的回应很晚。您可能需要回到服务器上,并从目录运行中找到存储库:

Very late response here. You'll probably need to get back onto the server and locate the repository there and from within the directory run:

git gc

git gc --aggressive

这篇关于当我做了一个大的提交时,Git仓库被破坏:“远程端可能的仓库损坏”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆