ฉันมีที่เก็บ git อยู่บนเซิร์ฟเวอร์ที่มีหน่วยความจำจำกัด เมื่อฉันพยายามโคลนพื้นที่เก็บข้อมูลที่มีอยู่จากเซิร์ฟเวอร์ ฉันได้รับข้อผิดพลาดต่อไปนี้
hemi@ubuntu:$ git clone ssh://[email protected]/home/hemi/repos/articles
Initialized empty Git repository in /home/hemi/Skrivebord/articles/.git/
[email protected]'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:$
เพื่อจัดการกับข้อผิดพลาดนี้ ฉันได้พยายามที่จะบรรจุพื้นที่เก็บข้อมูลเดิมใหม่ (ตาม โพสต์ในฟอรัมนี้) แต่แทนที่จะบรรจุพื้นที่เก็บข้อมูลใหม่ กลับอธิบายวิธีใช้คำสั่ง "git pack-objects"
hemi@servername:~/repos/articles$ git repack -a -d --window-memory 10m --max-pack-size 100m
usage: git pack-objects [{ -q | --progress | --all-progress }]
[--all-progress-implied]
[--max-pack-size=N] [--local] [--incremental]
[--window=N] [--window-memory=N] [--depth=N]
[--no-reuse-delta] [--no-reuse-object] [--delta-base-offset]
[--threads=N] [--non-empty] [--revs [--unpacked | --all]*]
[--reflog] [--stdout | base-name] [--include-tag]
[--keep-unreachable | --unpack-unreachable
[<ref-list | <object-list]
มีการติดตั้ง Git 1.6.5.7 บนเซิร์ฟเวอร์