多くのコードと数千の MP3 および PDF ファイル (それぞれ 5 ~ 40 MB の範囲) を含む一連のコミットをプッシュしようとしています。
Git はオブジェクトを正常にパックします。
C:\MyProject> git push
Counting objects: 7582, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (7510/7510), done.
しかし、まだ不明な理由でプッシュを送信できません。
問題は、ファイルを再パックするのに非常に長い時間がかかることです (私はバッテリー駆動のラップトップを使用しており、パックするのに約 20 分かかりました)。
したがって、私の質問は次のようなフレーズになると思います。
- 予行演習で作成されたパック オブジェクトを保存することはできますか?
- 保存したら、それらのパックされたオブジェクトをプッシュして、再パックを回避することは可能ですか?
git マニュアルなどで調べたところ、決定的なものは見つかりませんでした。
ヘルプやポインタをいただければ幸いです。
編集- エラーメッセージを追加しました:
これをコマンドライン (`git push') から初めて実行したときに、次のエラーが発生しました。
fatal: sha1 file '<stdout>' write error: Invalid argument
error: pack-objects died with strange error
error: failed to push some refs to 'account@server:project.git'
2 回目 ( git push origin master -v) 次のエラーが発生しました。
Pushing to account@server:project.git
Counting objects: 7582, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (7510/7510), done.
fatal: sha1 file '<stdout>' write error: Invalid argument
error: pack-objects died with strange error
error: failed to push some refs to 'account@server:project.git'
どちらの場合も、圧縮が終了した後、次のダイアログが表示されたことに注意してください。
---------------------------
PuTTY Fatal Error
---------------------------
Network error: Software caused connection abort
---------------------------
OK
---------------------------
ダイアログが開いている間、コンソールは次のように表示されます ([OK] をクリックすると、[オブジェクトの書き込み] 行が消去されます)。
Pushing to account@server:project.git
Counting objects: 7582, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (7510/7510), done.
Writing objects: 0% (1/7525)
EDIT 2 - git gcCharles Bailey の提案に従って実行した後、約 1.5 時間後に次の出力が得られました。
C:\Projects\MyProject>git gc
Counting objects: 10926, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (10125/10125), done.
warning: failed utime() on c:/Projects/MyProject/.git/objects/.tmp-10596-pack-a3a5ef775308593167a669b19aa752d2f484f768.pack: Permission denied
warning: failed utime() on c:/Projects/MyProject/.git/objects/.tmp-10596-pack-380270a0b5f3c7d30731c8e19f9271a59ea05e3d.pack: Permission denied
Writing objects: 100% (10926/10926), done.
Total 10926 (delta 719), reused 10858 (delta 719)
mv: cannot move `/c/Projects/MyProject/.git/objects/pack/pack-5dc233ff7aa1c33fc4845251186d5bafcefe3a11.pack' to `/c/Projects/MyProject/.git/objects/pack/old-pack-5dc233ff7aa1c33fc4845251186d5bafcefe3a11.pack'
error: failed to run repack