Wolfgang Denk [off-list ref] writes:
Is ther eany way to clean up such a situation and really get rid of
the dangling commits? I understand that I'd first need some way to
"unpack" the packs, but how to do this?
The easiest is to repack into a single big ball of wax:
$ git repack -a -d
If you know the pack the stale object is in, you can move it out
of objects/pack/ and repack only that one.
$ mv .git/objects/packs/pack-$badone.{idx,pack} .
$ git unpack-objects <pack-$badone.pack
$ git repack
After you are done:
$ git prune