title: How to test git hooks
body: <p>Since "testing" is a common use for a Git hook, my question is hard to search for.</p>
  
  <p>I'm writing a fairly involved git post-receive hook and want to know what the best way to test it is. Currently my process is:</p>
  
  <ul>
  <li>make changes to post-receive in a dummy "remote" repo</li>
  <li>make a change to a dummy local repo</li>
  <li>commit change in dummy local repo</li>
  <li>push change to dummy remote repo</li>
  </ul>
  
  <p>Is there any easier way to test this? Ideally it would look like:</p>
  
  <ul>
  <li>make change(s) to post-receive in a dummy repo</li>
  <li>issue "magic" command to test post-receive</li>
  </ul>
  
  <p>Perhaps I can "reissue" a previous push or have the remote repo act as though it just received a push with a specific hash?</p>