title: Getting into rebase -> merge cycle with Git
body: <p>I have a branch mainline tracking remote branch origin/mainline</p>
  
  <p>My local branch went out of sync with the remote branch so I did a git pull and now when i do a git status I get:</p>
  
  <pre><code>Your branch is ahead of 'origin/mainline' by 2 commits.
  </code></pre>
  
  <p>Now i want to squansh these into a single commit so i ran</p>
  
  <pre><code>git rebase -i HEAD~2
  </code></pre>
  
  <p>It opens up the file where I can squash the commit and pick one to use. I was expecting it to show just 2 commits (my original top level commit + the merge after pull ) but it has 3 commits in them with no merge commit. If i go ahead and sqash these into single one Git complains that I have a conflict, ( the same conflict i had after a pull). </p>
  
  <p>If i resolve the conflict and run git rebase --continue it end up in the state where I have 2 commits!! Please help me resolve this, im stck here for almost a day !!</p>