title: How do I create a patch from one branch to another using only a subset of the files that were changed?
body: <p>That is, suppose I want a patch that will take me from <code>branch1</code> to <code>branch2</code>, but I only care about files <code>foo1.c</code> and <code>foo2.c</code>, whereas other files also changed between the two branches.</p>
  
  <p><strong>How can I make a patch including exactly these two files?</strong></p>
  
  <p>If I just do <code>git diff branch1 branch2 &gt; Change.patch</code>, I will get all the files.</p>
  
  <p>If I just do <code>git diff branch1:foo1.c branch2:foo1.c &gt; Change.patch</code>, I only get the patch for one file.</p>