Re: delete deprecated refs to release disk space
- From
Peter Vereshagin <peter@vereshagin.org>
- Date
- Nov 14, 2011, 14:25 UTC
- Message-ID
- <20111114142525.GB8641@external.screwed.box>
- In-Reply-To
- <CACBZZX5kBqM1eye40_Vw0W=8qnNsUQBVCE0q9JrixYomGPuZbg@mail.gmail.com>
Hello.
2011/11/13 18:01:18 +0100 ??var Arnfj??r?? Bjarmason <avarab@gmail.com> => To Peter Vereshagin : vArB> What you're looking for is git-filter-branch + the graft facility. I vArB> can't remember the exact invocation, but you echo the sha1 of the vArB> commit you want to be the oldest commit to .git/info/grafts, then run vArB> git-filter-branch.
Seem to work for me ( with 'gc' and 'prune' thereafter ) but with these quirks: *) the git-filter-branch(1) tells that there must be two ids:
echo "$commit-id $graft-id" >> .git/info/grafts
This works for me if only one is put there. *) I'd like to have a command for this. Is this a '--parent-filter' to make the same thing?
N commits ago is a fine setting for me as it's a cron job backup. Thanks?
-- Peter Vereshagin <peter@vereshagin.org> (http://vereshagin.org) pgp: A0E26627