title: View diff of staged changes in git
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1587846/how-do-i-show-the-changes-which-have-been-staged">How do I show the changes which have been staged?</a>  </p>
  </blockquote>
  
  
  
  <p>Is there a simple way to view the diff of only the <strong>staged</strong> changes I have pending in git?  I've staged several files but want to take one last look at what I'm committing before I push the button.  I have several other unstaged changes that I want to go in a separate commit, so unstaging, doing <code>git diff</code>, and then paging through to the file I want isn't all that desirable an option.</p>
  
  <p>Example:</p>
  
  <pre><code>$ git status
  # On branch master
  # Changes to be committed:
  #   (use "git reset HEAD &lt;file&gt;..." to unstage)
  #
  #       modified:   foo.java
  #
  # Changed but not updated:
  #   (use "git add/rm &lt;file&gt;..." to update what will be committed)
  #   (use "git checkout -- &lt;file&gt;..." to discard changes in working directory)
  #
  #       modified:   bar.java
  #       modified:   baz.java
  #       modified:   qux.java
  </code></pre>
  
  <p>I really just want to see what I changed in <code>foo.java</code> without having to unstage.</p>