Re: dangling commits
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jan 15, 2006, 22:55 UTC
- Message-ID
- <7v8xth14pg.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20060115221108.3ED2E352659@atlas.denx.de>
Wolfgang Denk <wd@denx.de> 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 repackAfter you are done:
$ git prune