From: Peter Vereshagin Date: Mon, 14 Nov 2011 14:25:25 GMT Subject: Re: delete deprecated refs to release disk space Message-ID: <20111114142525.GB8641@external.screwed.box> In-Reply-To: Hello. 2011/11/13 18:01:18 +0100 ??var Arnfj??r?? Bjarmason => 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 (http://vereshagin.org) pgp: A0E26627