Re: renormalize histroy with smudge/clean-filter
- From
Chris Torek <chris.torek@gmail.com>
- Date
- Feb 7, 2025, 06:10 UTC
- Message-ID
- <CAPx1Gvc2piLT=p+dvzcJPTMDQAAjQfz__O4KiRWs-fOMg8dpTw@mail.gmail.com>
- 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 <jw@raven.inka.de> 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