title: Deploying with github, git_discovery_across_filesystem not set
body: <p>I've seen many threads and blog posts about my problem but none of them solved my problem, so I'll ask here if anyone has encountered the same problem. </p>
  
  <p>I'm attempting to deploy my website via github. I have created a bare hub.git repo on the server, I push my local git repo to it, checked if it worked with a git log and everything was fine.</p>
  
  <p>I then cloned this repo on the server in a repo called dev and made a virtual host for it and everything shows up fine.</p>
  
  <p>I used to push from local to hub and then pull hub from dev and it worked fine. I wanted to automate this, I wanted to be able to push from local to hub and automatically pull hub from dev. So I created a post-update file in hub.git/hooks and put this in it : </p>
  
  <pre><code>    #!/bin/bash
  echo
  echo "***** updating on dev *****"
  echo 
  cd /../dev || exit
  unset GIT_DIR
  git pull origin master
  </code></pre>
  
  <p>I then made sure that my post-update was executable with a </p>
  
  <pre><code>   chmod +x hooks/post-update
  </code></pre>
  
  <p>Went back to my local repo, changed a file</p>
  
  <pre><code>   git add .
     git commit -m "testing"
     git push origin
  </code></pre>
  
  <p>This message comes up</p>
  
  <pre><code>   remote : 
     remote : ***** updating on dev *****
     remote : 
     remote : fatal: Not a git repository (or any parent up to mount point /dev)
     remote : Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
  </code></pre>
  
  <p>I checked and there is a .git in my dev directory and the HEAD hasn't been renamed or anything. However I do have a HEAD, a FETCH_HEAD and a ORIGIN_HEAD (don't know if that would change anything).</p>
  
  <p>I'm not sure what the problem is here. The server is a gentoo x86 (if that might help at all).
  Sorry if I'm just missing something obvious or if this isn't the place to post this.</p>