Re: Trying to use git-filter-branch to compress history by removing large, obsolete binary files
- From
- J. Bruce Fields <bfields@fieldses.org>
- Date
- Oct 8, 2007, 19:05 UTC
- Message-ID
- <20071008190514.GM2902@fieldses.org>
- In-Reply-To
- <20071008163701.GA5868@thunk.org>
On Mon, Oct 08, 2007 at 12:37:01PM -0400, Theodore Tso wrote:
Show 9 quoted lines
> I think what makes git-filter-branch different is that you can change > a large amount of history with git-filter-branch, including large > numbers of tags, etc. The reflog is quite sufficient to recover from > a screwed up "git commit --amend". But I don't think the reflog is > going to be sufficient given the kinds of changes that > git-filter-branch can potentially do to your repository. Maybe > default of --backup vs --no-backup could be changed via a config > parameter, but I think the default is of backing up refs is a good > think....
Yeah, it's clearly designed with rewriting a whole repo in mind.
It might also be handy, though, as a quick way to rewrite a single branch. (E.g., "add 'Acked-by: Joe' to everything in 'for-upstream' not in 'origin'", or "rename foo to bar in every commit in 'topic' not in 'origin'".).
I find the current defaults awkward for that case. Maybe it'd make sense to treat the two cases differently.
> Perhaps a solution would be to add "git-filter-branch --cleanup" that > that clears the reflog and wipes the backed up tags; perhaps first > asking interactively if the user is really sure he/she wants to do > this.
Maybe.
--b.