title: Retroactively squashing a subtree merge
body: <p>I merged an external library into my project using <a href="http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html" rel="noreferrer">the subtree merge strategy</a>. I didn't pass the --squash option to 'git merge', so I now have the entire library history (which is huge) bloating the repository. How can I retroactively squash the merge?</p>
  
  <p>My situation is:</p>
  
  <pre><code>Z--Y--..--B--A
                \ 
             D---E---F---G master
  </code></pre>
  
  <p>I would like to get to:</p>
  
  <pre><code>           D---E---F---G master
  </code></pre>
  
  <p>Where E is the commit containing the merge.</p>
  
  <p>I guess the solution will involve 'git rebase' but I'm not sure how to use it properly in this case.</p>