From owner-freebsd-questions@FreeBSD.ORG Sun Feb 21 18:21:25 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EC101065676 for ; Sun, 21 Feb 2010 18:21:25 +0000 (UTC) (envelope-from jpg@sphinx.mythic-beasts.com) Received: from haggis.mythic-beasts.com (haggis.mythic-beasts.com [93.93.131.52]) by mx1.freebsd.org (Postfix) with ESMTP id C5A5D8FC18 for ; Sun, 21 Feb 2010 18:21:24 +0000 (UTC) Received: from [93.93.130.49] (helo=sphinx.mythic-beasts.com) by haggis.mythic-beasts.com with esmtp (Exim 4.69) (envelope-from ) id 1NjGQl-000210-77 for freebsd-questions@freebsd.org; Sun, 21 Feb 2010 18:21:23 +0000 Received: from jpg by sphinx.mythic-beasts.com with local (Exim 4.62) (envelope-from ) id 1NjGQk-0004jQ-G9 for freebsd-questions@freebsd.org; Sun, 21 Feb 2010 18:21:22 +0000 Date: Sun, 21 Feb 2010 18:21:21 +0000 From: Jamie Griffin To: freebsd-questions@freebsd.org Message-ID: <20100221182121.GA13485@sphinx.mythic-beasts.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-URL: http://www.mythic-beasts.com/~jpg User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Question about git X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jpg@mythic-beasts.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2010 18:21:25 -0000 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