Question about git

Jamie Griffin jpg at
Sun Feb 21 18:21:25 UTC 2010


I am having a problem with git. I followed a tutorial[1]  about managing a website hosted on a remote server with git version control. It explains to use a post-receive script to update a detached working tree. However, when ever I push from the local machine to remote server the script fails with this error:

Counting objects: 5, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 319 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
refs/heads/master: 863ce61088f2b6e2f8c5ccfa755c894558b83db3 -> 52e033ea3b7ef16c88e865e1dbc3c4f72ca47cc2
fatal: /usr/bin/git-checkout cannot be used without a working tree.
error: hooks/post-receive exited with error code 1
To ssh://
   863ce61..52e033e  master -> master

   I have been searching on the internet for hours and tried different things like unsetting the environment variables using env -i, or by explicitly setting the $GIT_WORK_TREE & $GIT_DIR variables in the script but it just will not run. 

   Can anyone who uses git help me to figure out how I can use this post-receive script to update a  detached work tree

   [1] http:// 

   Thank you.

More information about the freebsd-questions mailing list