renormalize histroy with smudge/clean-filter
- From
- Josef Wolf <jw@raven.inka.de>
- Date
- Feb 5, 2025, 21:47 UTC
- Message-ID
- <20250205214726.GA30202@raven.inka.de>
Hello all,
I have set up clean/smudge filters to normalzize files from an application to reduce the pain when those files are tracked by git.
The clean/smudge filter work well on new commit and the result of smudge+smudge+clean is the same as the result of a simple clean, so the filter should be fine IMHO.
But whenever I do any operations which introduce not yet normalized commits, I keep getting errors.
So to get rod of those errors, I'd like to also renormalize the history:
$ git rebase --root --strategy renormalize
error: Your local changes to the following files would be overwritten by
merge:
foo/bar/baz
Please commit your changes or stash them before you merge.
Aborting
$ git add foo/bar/baz
$ git commit -m renormalize foo/bar/baz
$ git rebase --continue
git: 'merge-renormalize' is not a git command. See 'git --help'.
error: could not apply abcdef... Foo Bar Baz
[ ... ]Huh? I never entered a command "merge-renormalize"
BTW: It does not make any difference whether I add "-c merge.renormalze=true"
What would be the proper way to renormalize history?
Any help?
-- Josef Wolf jw@raven.inka.de