rebasing on top of reformatted branch
- From
Simon Richter <simon.richter@hogyros.de>
- Date
- Dec 17, 2025, 06:33 UTC
- Message-ID
- <0e1e168e-e90c-4aba-a474-50d0df75a8e7@hogyros.de>
Hi,
I need to rebase a branch on top of a version that has had automatic formatting applied.
My usual approach for this is to create an empty extra commit after the branch point, then filter-branch all the commits on my branch with the same automatic formatting, then continue rebasing. Because the filter is applied to the tree, no three-way merges are performed, avoiding the conflicts.
Is there a way to automate this in a nicer way, especially if I have multiple branches that need to be rebased in this way?
Simon