title: How to filter git diff based on file type?
body: <p>Is there an option to restrict <code>git diff</code> to show only a given set of file types?</p>
  <p>By types I mean only regular files, symlinks, submodules, etc, as listed non exhaustively in the description of <a href="https://git-scm.com/docs/git-diff-tree#Documentation/git-diff-tree.txt---diff-filterACDMRTUXB82308203" rel="nofollow noreferrer"><code>--diff-filter</code></a>.</p>
  <p>I am particularly interested in getting a diff containing only regular files.</p>
  <p>Note that this question is not the same as <a href="https://stackoverflow.com/questions/8554776/how-to-filter-git-diff-based-on-file-extensions">How to filter git diff based on file extensions?</a></p>
  <p><strong>EXAMPLE</strong>: Suppose I have this output</p>
  <pre><code>git diff --raw HEAD^^ HEAD
  :100644 100644 8e994d8 c79147d M        lib/esq.txt
  :000000 120000 0000000 daee357 A        lib/file
  </code></pre>
  <p>where <code>lib/file</code> is a symlink.</p>
  <p>Is there some option to pass to <code>git diff</code> to exclude the symlink from the output, or do I have to filter the output outside of Git by testing the modes?</p>
  <p>Thanks</p>