{"thread":{"id":"18910","subject":"git for local web development","startedAt":"2009-04-17T00:56:34Z","lastAt":"2009-04-17T00:56:34Z","messageCount":1,"participants":["William DiNoia"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"111471","messageId":"loom.20090417T005116-449@post.gmane.org","threadId":"18910","inReplyTo":null,"subject":"git for local web development","fromName":"William DiNoia","fromEmail":"william.dinoia@mac.com","sentAt":"2009-04-17T00:56:34Z","receivedAt":"2009-04-17T00:56:34Z","isPatch":false,"sender":{"key":"william.dinoia@mac.com","avatar":null},"body":"Hello,\n\nI am having a bit of trouble trying to setup git for web development.\nI would like to have a git repository in /var/www/sites which I can clone and\nwork on from my ~/Desktop. Working from the desktop clone, I would like to be\nable to git-push and have the work tree updated. It seems this is a common\nrequest as it is in the FAQ entitled, Why won't I see changes in the remote\nrepo after \"git push\"?\n\nThis is what I've done...\n\nas www-data from /var/www/sites/\n\n$mkdir test.com\n$cd test.com\n$git-init\n$git-config core.worktree /var/www/sites/test.com\n$vim .git/hooks/post-receive\n#!/bin/sh\ngit-checkout -f\n$chmod +x .git/hooks/post-receive\n\nThen as william from /home/william/Desktop/\n\n$git-clone /var/www/sites/test.com\n$cd test.com\n$vim index.html\ntesting, testing, 1,2\n$git-add index.html\n$git-commit\n$git-push origin master\n\nSomething like the following is returned, and the work tree at\n/var/www/sites/test.com is not updated\n\nCounting objects: 5, done.\nCompressing objects: 100% (2/2), done.\nWriting objects: 100% (3/3), 277 bytes, done.\nTotal 3 (delta 1), reused 0 (delta 0)\nUnpacking objects: 100% (3/3), done.\nTo /var/www/sites/test.com/.git\n   9b490a2..5e5cc63  master -> master\nerror: unable to unlink old 'index.html' (Permission denied)\nerror: hooks/post-receive exited with error code 1\n\nThe interesting part is that if I change to /var/www/sites/test.com and run\n\"git-checkout -f\" it updates the work tree...\nShould I be using a different hook? \n"}]}