Note that there are some explanatory texts on larger screens.

plurals
  1. POgit: Is it possible to save the packed objects of a dry run and push them later?
    primarykey
    data
    text
    <p>I'm trying to push a bunch of commits that contain a lot of code and a few thousand MP3 and PDF files besides (ranging from 5-40 MB each).</p> <p>Git successfully packs the objects:</p> <pre><code>C:\MyProject&gt; git push Counting objects: 7582, done. Delta compression using up to 2 threads. Compressing objects: 100% (7510/7510), done. </code></pre> <p>But it fails to send the push for some as yet unknown reason.</p> <p>The problem is that it takes it a very long time to repack the files (I'm on a battery-powered laptop and it took about 20 minutes to pack).</p> <p>So I guess my question can be phrases thus:</p> <ol> <li>Is it possible to save the packed objects created in a dry run?</li> <li>Once saved, is it possible to push those packed objects and avoid repacking?</li> </ol> <p>I looked it up in the git manual and elsewhere and couldn't find anything conclusive.</p> <p>Any help or pointers are appreciated.</p> <hr> <p><strong>EDIT</strong> - Added the error messages:</p> <p>The first time I ran this from the commandline (`git push') I got this error:</p> <pre><code>fatal: sha1 file '&lt;stdout&gt;' write error: Invalid argument error: pack-objects died with strange error error: failed to push some refs to 'account@server:project.git' </code></pre> <p>The second time (<code>git push origin master -v</code>) I got this error:</p> <pre><code>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 '&lt;stdout&gt;' write error: Invalid argument error: pack-objects died with strange error error: failed to push some refs to 'account@server:project.git' </code></pre> <p>Note that in both cases, after the compression finished, I got this dialog:</p> <pre><code>--------------------------- PuTTY Fatal Error --------------------------- Network error: Software caused connection abort --------------------------- OK --------------------------- </code></pre> <p>While the dialog was open, the console read as follows (the "Writing objects" line was erased after clicking OK):</p> <pre><code>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) </code></pre> <hr> <p><strong>EDIT 2</strong> - After running <code>git gc</code> per Charles Bailey's suggestion, I got the following output after about 1.5 hours:</p> <pre><code>C:\Projects\MyProject&gt;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 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload