title: git diff --stat exclude certain files
body: <p>Trying to adapt the answers from <a href="https://stackoverflow.com/q/10415100/281545">Want to exclude file from &quot;git diff&quot;</a> for the <code>--stat</code> flag and failing - the <a href="https://stackoverflow.com/a/10421385/281545">accepted answer</a> (create a driver) seems unix only (redirect to /bin/true, whatever this means) plus it creates a driver and assigns it to the file kind of permanently, while I am looking for a switch to temporarily disable the diff for a file (or rather some files). </p>
  
  <p>The scripting <a href="https://stackoverflow.com/a/10421413/281545">solution</a>:</p>
  
  <pre><code>git diff `git status -s |grep -v ^\ D |grep -v file/to/exclude.txt |cut -b4-`
  </code></pre>
  
  <p>actually calls git status and edits its output - while what I want is to instruct git diff itself to ignore some files while calculating the (simple) --stat (just lines changed). I went through <a href="https://git-scm.com/docs/git-diff" rel="noreferrer">git-diff</a> docs but can't seem to find such an option. Anyone give me a hand ?</p>
  
  <pre><code>$ git --version
  git version 2.6.1.windows.1
  </code></pre>