title: Git diff --name-only and copy that list
body: <p>I just want to get a list of changed files between two revisions, which is simple:</p>
  
  <pre><code>git diff -–name-only commit1 commit2 &gt; /path/to/my/file
  </code></pre>
  
  <p>But, what should I write, if I want copy all that listed files to another place? And I need completely identical directory structure for copied files.</p>
  
  <p>For example, I have modified and added files:</p>
  
  <pre><code>/protected/texts/file1.txt
  /protected/scripts/index.php
  /public/pics/pic1.png
  </code></pre>
  
  <p>I want to have in <code>/home/changes/</code> all those changed and added files:</p>
  
  <pre><code>/home/changes/protected/texts/file1.txt
  /home/changes/protected/scripts/index.php
  /home/changes/public/pics/pic1.png
  </code></pre>