title: Using git, how do you reset the working tree (local file system state) to the state of the index ("staged" files)?
body: <p>Situation:</p>
  <ol>
  <li>Edit files</li>
  <li>Add files to the index with <code>git add</code> (these files are now &quot;staged&quot;)</li>
  <li>Edit more files</li>
  </ol>
  <p>Now we have three different states: the state of <code>HEAD</code> (which points to the last commit), the state of the index (which includes all added, or &quot;staged&quot; files) and the state of the working tree (the unstaged, local file system state). What is the command to undo changes in the working tree so that it matches the state of the index?</p>