git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Trying to use git-filter-branch to compress history by removing large, obsolete binary files

From
JFJ. 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.
Previous: Theodore TsoNext: Johannes Schindelin
Message 29 of 31 in “Trying to use git-filter-branch to compress history by removing large, obsolete binary files”
  1. Elijah NewrenOct 7, 2007
  2. Frank LichtenheldOct 7, 2007
  3. Elijah NewrenOct 7, 2007
  4. Alex RiesenOct 7, 2007
  5. Elijah NewrenOct 7, 2007
  6. Alex RiesenOct 7, 2007
  7. Elijah NewrenOct 8, 2007
  8. Alex RiesenOct 8, 2007
  9. Andreas EricssonOct 8, 2007
  10. Dmitry PotapovOct 7, 2007
  11. Elijah NewrenOct 8, 2007
  12. Dmitry PotapovOct 8, 2007
  13. Andreas EricssonOct 8, 2007
  14. Karl HasselströmOct 8, 2007
  15. Dmitry PotapovOct 8, 2007
  16. Karl HasselströmOct 8, 2007
  17. Johannes SchindelinOct 7, 2007
  18. Elijah NewrenOct 7, 2007
  19. Johannes SchindelinOct 7, 2007
  20. Elijah NewrenOct 7, 2007
  21. Johannes SchindelinOct 8, 2007
  22. Elijah NewrenOct 8, 2007
  23. Sam VilainOct 8, 2007
  24. J. Bruce FieldsOct 8, 2007
  25. Johannes SchindelinOct 8, 2007
  26. Johannes SixtOct 8, 2007
  27. J. Bruce FieldsOct 8, 2007
  28. Theodore TsoOct 8, 2007
  29. J. Bruce FieldsOct 8, 2007
  30. Johannes SchindelinOct 9, 2007
  31. Alex RiesenOct 7, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.