From: Chris Torek Date: Fri, 07 Feb 2025 06:10:26 GMT Subject: Re: renormalize histroy with smudge/clean-filter Message-ID: In-Reply-To: <20250206200418.GD30202@raven.inka.de> [First] > On Thu, Feb 06, 2025 at 02:40:06PM +0100, Josef Wolf wrote: > > > foreach $commit original-branch-commits > > git cherry-pick $commit [then] >On Thu, Feb 6, 2025 at 12:07 PM Josef Wolf wrote: > I've done a lot of try and error with this approach and have come to the > conclusion, that cherry-pick totally mis-behaves in the presence of > clean/smudge filters. I suspect, actually, that the biggest problem here is that cherry-pick defaults to working by using merge. Given that you want to create a new linear set of "cleaned" commits, you don't want to use `git cherry-pick` at all. Just restore the files from the original commit, then add and commit. Chris