title: Rebasing to change parent of a merge commit
body: <p>Suppose I've got the following history, where the top line is the master branch, the lower one is a feature branch that's merged with master at one point, and <code>D</code> just reverts <code>C</code> (which means that the working directory is the same in <code>B</code> and <code>D</code>). </p>
  
  <pre><code>A---B---C---D           master
   \   \
    E---F---G             feature
  </code></pre>
  
  <p>I want to add <code>C</code> and its reversion <code>D</code> to the history before the merge in <code>F</code>, like this:</p>
  
  <pre><code>A---B---C---D           master
   \           \
    E-----------F'--G'    feature
  </code></pre>
  
  <p>I don't want to change <code>E</code> (which is actually a long series of commits).</p>
  
  <p><code>git rebase --onto D B</code> (as suggested <a href="https://stackoverflow.com/a/3810400/334519">here</a>) results in merge conflicts (with or without <code>--preserve-merges</code>).</p>
  
  <p>Is there a way to accomplish what I want?</p>