title: Checking for a dirty index or untracked files with Git
body: <p>How can I check if I have any uncommitted changes in my git repository:</p>
  
  <ol>
  <li>Changes added to the index but not committed</li>
  <li>Untracked files</li>
  </ol>
  
  <p>from a script?</p>
  
  <p><code>git-status</code> seems to always return zero with git version 1.6.4.2.</p>