title: Apply automated file conversion (transformation) starting at a past revision, preserving history
body: <p>For a given project (on which I'm currently working exclusively), I'd like to apply a certain automated conversion on some files. For this discussion, let's assume I want to change line endings from Windows style to Unix style on all text files. I want the new format to be effective as of a certain revision in the past, and carried through the history.</p>
  
  <p>What I usually do is the following: I start an interactive rebase and append the following after each commit starting with the desired starting point:</p>
  
  <pre><code>exec &lt;transformation rule&gt;
  exec git commit -m "transform" &amp;&amp; git revert --no-edit HEAD
  </code></pre>
  
  <p>This leads to a <code>transform</code> followed by a sequence of original commits, each surrounded with <code>revert</code> and <code>transform</code>, followed by a final <code>revert</code>. Then I execute a second interactive rebase and squash all triplets <code>revert</code>-<code>&lt;original commit&gt;</code>-<code>transform</code>, and remove the last <code>revert</code>. The first <code>transform</code> stays in place, all other <code>transform</code> and <code>revert</code> commits vanish.</p>
  
  <p>This manual process yields (almost) the desired result (I'm not sure about commit dates for the new commits), but I was wondering of it is possible to automate this using <code>filter-branch</code>, <code>fast-import</code> or perhaps a custom tool that I have missed in my cursory search.</p>