title: Order of commit arguments in git diff
body: <p>In what order does the git command</p>
  
  <pre><code>git diff [--options] &lt;commit&gt; &lt;commit&gt; [--] [&lt;path&gt;…]
  </code></pre>
  
  <p>Compare the different commits against each other? It seems like if I want to compare the new against the old one I need to do</p>
  
  <p><code>git diff [--options] &lt;New_commit&gt; &lt;Old_commit&gt;</code> in order to see the current diff?</p>
  
  <p>I usually do <code>git diff [--options] &lt;Old_commit&gt; &lt;New_commit&gt;</code></p>
  
  <p>But that seems to be wrong?</p>
  
  <p>When I do for example </p>
  
  <pre><code>$ git diff `git rev-list --since="jun 30 2014" --reverse origin/master | head -1` `git rev-list --until="dec 31 2014" origin/master | head -1` --shortstat 
  
  1072 files changed, 389650 insertions(+), 39180 deletions(-)
  </code></pre>
  
  <p>But when I do </p>
  
  <pre><code>$ git diff --stat `git rev-list --until="dec 31 2014" origin/master | head -1`
  </code></pre>
  
  <p>I get the printout that:</p>
  
  <pre><code>384 files changed, 61255 insertions(+), 20526 deletions(-)
  </code></pre>
  
  <p>Which is not near 300000. So my question is if I should insert the new commit first and the old commit sedond, like:</p>
  
  <pre><code> $ git diff `git rev-list --until="dec 31 2014" origin/master | head -1`..`git rev-list --since="jun 30 2014" --reverse origin/master | head -1` 
  </code></pre>
  
  <p>I can't find any documentation about in which order I should insert the commits in order to see the difference between my new and my old commit. Perhaps you can clarify this for me?</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Edit:</strong>
  The reason I'm asking is that I want to </p>
  
  <ol>
  <li><p>know how many new lines of code that has been added to a new commit given an old commit, and</p></li>
  <li><p>I want to calculate the number of lines of code in the new commit.</p></li>
  </ol>