title: Discard all uncommitted changes, modified files, added files and non-added
body: <p>What is the best way to discard uncommitted changes with Git.  </p>
  
  <p>I read this, but want to fully understand what each step is doing.</p>
  
  <p><a href="https://stackoverflow.com/questions/14075581/git-undo-all-uncommitted-or-unsaved-changes">git undo all uncommitted or unsaved changes</a></p>
  
  <pre><code>git reset
  </code></pre>
  
  <h3>"This will unstage all files you might have staged with git add", what does unstage mean?</h3>
  
  <p>Does this mean remove any added files?</p>
  
  <pre><code>git checkout .
  </code></pre>
  
  <h3>"revert all local uncommitted changes (should be executed in repo root)"</h3>
  
  <p>What is considered the root? If I am on Branch A and I want to disregard all uncommitted changes on Branch A, is Branch A considered the root?</p>
  
  <pre><code>git clean -fdx
  </code></pre>
  
  <h3>"WARNING: -x will also remove all ignored files, including ones specified by .gitignore! You may want to use -n for preview of files to be deleted."</h3>
  
  <p>Is this deleting my files? including ignored files? What if ignored files were not changed?</p>
  
  <h2>I simple want go back to my last commit and not worry about any changes after it. What is the simplest and safest way to do that?</h2>