title: Git cannot undo modified files
body: <p>I just want to get back to a clean working directory, exactly as it was after my last commit. Git is reporting to me a load of file modifications that I haven't made, so I suspect it's something to do with line endings.</p>
  
  <p>I have tried all the usual suspects to do this:</p>
  
  <p><code>git reset --hard</code>
  <code>git commit -- .</code>
  <code>git stash</code>
  <code>git clean -fd</code></p>
  
  <p>No matter what I do, <code>git status</code> always shows the same files as having been modified. What can I do? I have uncommitted changes stashed in another branch so I don't want to just blast away everything, but rather just "roll back" my master branch.</p>
  
  <p><strong>EDIT:</strong> Output</p>
  
  <pre><code>$ git status
  # On branch master
  # 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:   demo/index.html
  #   modified:   demo/js/app.js
  #   modified:   demo/js/libs/jquery.1.7.1.js
  #   modified:   demo/js/libs/matchMedia.js
  #   modified:   demo/js/libs/modernizr.js
  #   modified:   demo/js/loadr.js
  #   modified:   dist/enquire.js
  #   modified:   src/include/intro.js
  #
  no changes added to commit (use "git add" and/or "git commit -a")
  </code></pre>
  
  <p>Then I try what is suggested and everything else I could find:</p>
  
  <pre><code>WickyNilliams at Nick MBA in ~/Repositories/enquire on master*
  $ git checkout -- .
  WickyNilliams at Nick MBA in ~/Repositories/enquire on master*
  $ git reset --hard
  HEAD is now at d70fee4 added meta tag to test demo on mobile #10
  WickyNilliams at Nick MBA in ~/Repositories/enquire on master*
  $ git status
  # On branch master
  # 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:   demo/index.html
  #   modified:   demo/js/app.js
  #   modified:   demo/js/libs/jquery.1.7.1.js
  #   modified:   demo/js/libs/matchMedia.js
  #   modified:   demo/js/libs/modernizr.js
  #   modified:   demo/js/loadr.js
  #   modified:   dist/enquire.js
  #   modified:   src/include/intro.js
  #
  no changes added to commit (use "git add" and/or "git commit -a")
  </code></pre>
  
  <p>As you can see, no changes despite the rollback.</p>
  
  <p>So then I followed advice and ran a diff ignoring all space, and as suspected it seems there's no differences when ignoring spaces - so i guess it was line endings! What can I do to fix this? I've set to <code>autocrlf</code> to <code>true</code> to no avail.</p>