title: Git squashing a few commits
body: <p>I'm facing a scenario wit git squash. I have a feature branch which has already around 70 commits. While I was adding commits, the master branch also had so many changes and because of that I had done several merges in this 70 commits. Now I want to merge to the master but before that i need to clean up the history by reducing to say ,30 commits. I tried direct squashing without rebase but i was getting lots of conflicts on files which I didnt work. So I thought I would rebase first to the latest master and then squash some of the commits. –, i.e not squashing all the commits into 1 single commit. This is what i tried:</p>
  <ol>
  <li>git rebase to master( git rebase -i master)</li>
  </ol>
  <p>I get conflicts on most of the commits and i try to solve it, and get all commits on top of the master branch. This is also a bit tricky as the master also had changes on the same files which I worked and sometimes when I solve the conflicts, the commit may look incorrect( as in the code may not be compilable).</p>
  <p>Is there a better way to handle this situation ?</p>