Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Feb 2010 18:21:21 +0000
From:      Jamie Griffin <jpg@mythic-beasts.com>
To:        freebsd-questions@freebsd.org
Subject:   Question about git
Message-ID:  <20100221182121.GA13485@sphinx.mythic-beasts.com>

next in thread | raw e-mail | index | archive | help
Hi

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://jpg@sphinx.mythic-beasts.com/home/jpg/website_devel.git
   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://http://toroid.org/ams/git-website-howto 

   Thank you.
-- 
 
         Jamie

http://www.mythic-beasts.com/~jpg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100221182121.GA13485>