title: git checkout all the files
body: <p><strong>How can I get rid of all the changes in all the files of my repository?</strong></p>
  
  <p>Say I am in a branch and I did some changes. <code>git status</code> returns a set of files in the "Changes not staged for commit" and I notice I would like to get rid of all of these changes in all the files. How can I do this with a single command?</p>
  
  <p>I know I can do the following to checkout just one file:</p>
  
  <pre><code>git checkout -- &lt;file&gt;
  </code></pre>
  
  <p>I noticed that <code>git checkout --</code> alone returns the list of all uncommited files. However, I cannot find a way to checkout all of them, something like <code>git checkout --all</code>.</p>
  
  <p>I checked <code>man git checkout</code> and could not find anything. Also I saw <a href="https://stackoverflow.com/q/20008025/1983854">Git: Checkout all files except one</a> and tried <code>git checkout .</code> and did not work either.</p>
  
  <p>Would I have to do it programmatically, by looping through the <code>git checkout --</code> output?</p>