title: How can I generate a diff for a single file between two branches in github
body: <p>I need to generate a diff for a single file that will show the differences between two versions, which are actually tags in github. I then want to send this diff to someone via email so a github URL for the diff would be ideal. The github compare view will allow me to do this for all changed files, but that's no good as there are thousands of files in my repo.</p>
  
  <p>I can do this in the command line as follows, but this doesn't help as I need to send the diff to someone via email:</p>
  
  <pre><code>git diff tag1 tag2 -- path/to/file
  </code></pre>
  
  <p>I found the command line version discussed here:
  <a href="https://stackoverflow.com/questions/10611112/how-can-i-see-the-differences-in-a-designated-file-between-a-local-branch-and-a">how can I see the differences in a designated file between a local branch and a remote branch?</a></p>