title: Best way to debug git-hooks
body: <p>What is the best way to debug git-hooks?</p>
  
  <p>The way I prefer is adding statements to add output to a log file. For example, the following.</p>
  
  <pre><code>echo 'post-receive executed' &gt;&gt; hooks.log
  </code></pre>
  
  <p>Is there a better approach or way to do logging?</p>