git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Next: Kristoffer Haugsbakk
Message 1 of 2 in “rebasing on top of reformatted branch”
  1. Simon RichterDec 17, 2025
  2. Kristoffer HaugsbakkDec 17, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.