Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I can't say for sure without access to your repository data, but I believe there are probably one or more packed refs still referencing old commits from before you ran <code>git filter-branch</code>. This would explain why <code>git fsck --full --unreachable</code> doesn't call the large blob an unreachable object, even though you've expired your reflog and removed the original (unpacked) refs.</p> <p>Here's what I'd do (after <code>git filter-branch</code> and <code>git gc</code> have been done):</p> <p><em>1) Make sure original refs are gone:</em></p> <p><code>rm -rf .git/refs/original</code></p> <p><em>2) Expire all reflog entries:</em></p> <p><code>git reflog expire --all --expire='0 days'</code></p> <p><em>3) Check for old packed refs</em></p> <p>This could potentially be tricky, depending on how many packed refs you have. I don't know of any Git commands that automate this, so I think you'll have to do this manually. Make a backup of <code>.git/packed-refs</code>. Now edit <code>.git/packed-refs</code>. Check for old refs (in particular, see if it packed any of the refs from <code>.git/refs/original</code>). If you find any old ones that don't need to be there, delete them (remove the line for that ref).</p> <p>After you finish cleaning up the <code>packed-refs</code> file, see if <code>git fsck</code> notices the unreachable objects:</p> <p><code>git fsck --full --unreachable</code></p> <p>If that worked, and <code>git fsck</code> now reports your large blob as unreachable, you can move on to the next step.</p> <p><em>4) Repack your packed archive(s)</em></p> <p><code>git repack -A -d</code></p> <p>This will ensure that the unreachable objects get unpacked and <em>stay</em> unpacked.</p> <p><em>5) Prune loose (unreachable) objects</em></p> <p><code>git prune</code></p> <p>And that should do it. Git really should have a better way to manage packed refs. Maybe there is a better way that I don't know about. In the absence of a better way, manual editing of the <code>packed-refs</code> file might be the only way to go.</p>
 

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