[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 <jw@xxxxxxxxxxxxx> 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