title: Undo several commits in git which have not pushed to remote
body: <p>I have run git status and </p>
  
  <pre><code># On branch master
  # Your branch is ahead of 'origin/master' by 4 commits.
  #   (use "git push" to publish your local commits)
  #
  # Changes not staged for commit:
  #   (use "git add &lt;file&gt;..." to update what will be committed)
  #   (use "git checkout -- &lt;file&gt;..." to discard changes in working directory)
  #
  #       modified:   app/views/layouts/_header.html.erb
  #
  no changes added to commit (use "git add" and/or "git commit -a")
  </code></pre>
  
  <p>I want undo all the 4 commits and changes not staged for commit before commiting to my remote repository. How can i do this?</p>