相关疑难解决方法(0)

重新包装Git存储库失败

我有一个git存储库驻留在内存有限的服务器上.当我尝试从服务器克隆现有存储库时,我收到以下错误

hemi@ubuntu:$ git clone ssh://hemi@servername.dk/home/hemi/repos/articles
Initialized empty Git repository in /home/hemi/Skrivebord/articles/.git/
hemi@servername.dk's password: 
remote: Counting objects: 666, done.
remote: warning: suboptimal pack - out of memory
remote: fatal: Out of memory, malloc failed
error: git upload-pack: git-pack-objects died with error.
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
hemi@ubuntu:$ 
Run Code Online (Sandbox Code Playgroud)

为了处理这个错误,我试图重新打包原始存储库(根据此论坛帖子).但是,它不是重新打包存储库,而是描述了如何使用"git pack-objects"命令.

hemi@servername:~/repos/articles$ git repack -a -d …
Run Code Online (Sandbox Code Playgroud)

git repository

58
推荐指数
4
解决办法
6万
查看次数

我怎么知道 `git gc --auto` 是否做了什么?

git gc --auto作为自动保存脚本的一部分运行。如果git gc --auto做了什么,我想进一步清理,但如果git gc --auto觉得不需要做些什么,我想省去麻烦。有没有办法检查 的返回值git gc --auto,或者事先检查是否有必要运行它?

git

2
推荐指数
2
解决办法
2108
查看次数

标签 统计

git ×2

repository ×1