开发者

Git repository gets corrupted when I do a large commit: "Possible repository corruption on the remote side"

开发者 https://www.devze.com 2023-01-03 06:31 出处:网络
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:

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

Pretty standard stuf开发者_运维问答f, 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

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.

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

or

git gc --aggressive


Is the push to the remote server failing? Maybe there is some packet loss on the connection and delta's are incomplete. Try setting up a bare repository on your local machine to push to and clone from and tell if it's still breaking.

0

精彩评论

暂无评论...
验证码 换一张
取 消