title: Avoid unwanted merge commits and other commits when doing pull request on GitHub
body: <p>I forked a project on Github.</p>
  
  <p>Let the remote upstream be <code>upstream</code> and my remote repository be <code>origin</code>.
  My local <code>master</code> branch is set to track the remote <code>master</code> branch.
  Then I added some stuff in local <code>master</code>, and I merged with the upstream every now and then.</p>
  
  <p>Not until today when I want to issue a pull request did I find the problem:
  the pull request consists those <strong>merge commits</strong>, and those <strong>unwanted commits</strong> that I did previously without care. However what I want is just to submit the last commit I did, which should be pulled as a single commit.
  What can I do to rescue this?</p>