title: Mock a git repo to test against
body: <p>Is there an easy way to mock a git server/repo for unit testing purposes? I don't want to test git itself, rather how my code interacts with git. </p>
  
  <p>I'd like to do something like </p>
  
  <pre><code>create git@localhost.com:myRepo.git c:/somepath
  copy somefile.txt c:/somepath
  </code></pre>
  
  <p>and then when I </p>
  
  <pre><code>git clone git@localhost.com:myRepo.git
  </code></pre>
  
  <p>the entire contents of c:/somepath (somefile.txt) is returned, no authentication needed. I want to test how my code handles the clone, so all calls to this git repo should automatically pass authentication.</p>
  
  <p>I looked at git daemon but it runs on real git, so my test code ended up have to do a lot of repo content management (adding, committing, branching etc), which seems unnecessary.</p>