title: Git - squashing earlier commits and reflecting it on different branches
body: <p>I'm fairly new to Git and I'm trying to squash a series of earlier commits, but I'm having problems having this 'squashing' reflect on all branches.</p>
  
  <p>I started with the following tree:</p>
  
  <pre><code>A----&gt;B----&gt;C----&gt;D----&gt;E----&gt;F----&gt;G----&gt;H (Branch 1)
                                            \
                                             \
                                              \
                                               I----&gt;J----&gt;K (Branch 2)
  </code></pre>
  
  <p>I want to 'squash' commits C, D, E and F, but I want this 'squashing' to be reflected on both Branches 1 and 2.</p>
  
  <p>I tried <code>'git rebase -i HEAD~7'</code> and did the necessary changes (while on Branch 1), but this is what I ended with:</p>
  
  <pre><code>A----&gt;B----&gt;C'----&gt;G----&gt;H (Branch 1)
        \
         \
          \
           C----&gt;D----&gt;E----&gt;F----&gt;G----&gt;H----&gt;I----&gt;J----&gt;K (Branch 2)
  </code></pre>
  
  <p>When what I wanted to get was:</p>
  
  <pre><code>A----&gt;B----&gt;C'----&gt;G----&gt;H (Branch 1)
                            \
                             \
                              \
                               I----&gt;J----&gt;K (Branch 2)
  </code></pre>
  
  <p>What am I doing wrong? Is there a way to achieve the result I want?</p>
  
  <p>Thanks in advance.</p>