title: How to remove selected commit log entries from a Git repository while keeping their changes?
body: <p>I would like to remove selected commit log entries from a linear commit tree, so that the entries do not show in the commit log.</p>
  
  <p>My commit tree looks something like:</p>
  
  <pre><code>R--A--B--C--D--E--HEAD
  </code></pre>
  
  <p>I would like to remove the B and C entries so that they do not show in the commit log, but changes from A to D should be preserved. Maybe by introducing a single commit, so that B and C become BC and the tree looks like.</p>
  
  <pre><code>R--A--BC--D--E--HEAD
  </code></pre>
  
  <p>Or, ideally, after A comes D directly. D' representing changes from A to B, B to C and C to D.</p>
  
  <pre><code>R--A--D'--E--HEAD
  </code></pre>
  
  <p>Is this possible? if yes, how?</p>
  
  <p>This is a fairly new project so has no branches as of now, hence no merges as well.</p>