title: Git site deployment - checkout in post-receive hook not working
body: <p>I've followed this tutorial <a href="http://toroid.org/ams/git-website-howto" rel="nofollow">'Using Git to manage a web site'</a>, using Tower to commit and push my local repo to the remote server. Pushing succeeds with the following message:</p>
  
  <pre><code>Pushing to ssh://user@mysite.com/~/git/tprevo.git
  stdin: is not a tty
  Counting objects: 40, done.
  Delta compression using up to 2 threads.
  Compressing objects: 100% (37/37), done.
  Writing objects: 100% (40/40), 171.95 KiB, done.
  Total 40 (delta 3), reused 0 (delta 0)
  To ssh://user@mysite.com/~/git/tprevo.git
   * [new branch]      master -&gt; production
  updating local tracking ref 'refs/remotes/production/production'
  
  Successfully created tracking connection.
  </code></pre>
  
  <p>I've verified that my post-receive hook is executing, but the <code>checkout</code> command doesn't add the pushed code into what I believe I've set up as my working directory. I've been trying to figure this out all day.</p>
  
  <p><strong>post-receive:</strong></p>
  
  <pre><code>#!/bin/sh
  GIT_WORK_TREE=/home/tprevo/public_html/tprevo git checkout -f
  </code></pre>
  
  <p>I'm new to Git and very keen to learn. What's the best way to debug this?</p>