[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rewriting the entire git history... how?



On Tue, 9 Dec 2025, Bryan Gardiner wrote:

Hi Tim,

On Tue, 9 Dec 2025 19:48:06 +0000 (GMT)
Tim Woodall <debianuser@woodall.me.uk> wrote:

I want to rewrite git history from the very first commit (which is an
empty commit) but nothing I can find seems to let me do this other
than with manual intervention.

This is a one off and doesn't need to be efficient so long as I can
leave it to get on with it without intervention.

The built-in way to do this is to use `git filter-branch`.  There are
a number of examples on the git-filter-branch man page, and it looks
like a combination of the --tree-filter and --env-filter arguments
would make the modifications you want.

Yes! This works. Thanks. (at least the tree-filter bit)

Tim.


Reply to: