title: How to revert a folder to a particular commit by creating a patch
body: <p>Here's my history for the folder 'somefolder'</p>
  
  <pre><code>$ git log somefolder
  
  commit 89cd
  More changes to somefolder
  
  commit ef47a
  Updating somefolder and other stuff
  
  commit e095
  Bugs fixed in somefolder
  </code></pre>
  
  <p>I want to revert somefolder back to the 'Bugs fixed in some folder" commit.</p>
  
  <p>Since the second commit involved changes outside of somefolder, I don't want to revert this commit. </p>
  
  <p>I guess the safest way would be to create a diff/patch between commit e095 and 89cd that applies just to some folder, and then apply that patch. How can I do that?</p>