title: What is the difference between 'git format-patch and 'git diff'?
body: <p>I don't see a difference between the output of 'git format-patch' and 'git diff', is there any? And won't I be able to use 'git diff' to produce a patch and then apply it using git apply?</p>
  
  <p>My problem is that I have changes added to the index, but apparently git format-patch only accepts commits, so if I can use the output of diff, then I can use this command to produce a patch for the changes in the index:</p>
  
  <pre><code>git diff --cached &gt; index.patch
  </code></pre>