_ _ _ _ _ _
| | (_|_) | (_) |
| | ___ _ _| | ___| |
| |/ _ \| | | |/ / | |
| | (_) | | | <| | |
purveyors of fine, internet-related kipple since 1985.
. » p » misc » sysadmin » git-postreceive.txt
I needed a quick way to get Lojikil and XRL up and running when we commit changes; both sites are static,
and XRL uses some crazy static site generator, whereas Lojikil uses Muse. In any case, I originally followed
these instructions here and I thought it would be a good time to document that. The long and the short of it is:
git init --bare
echo "#!/bin/sh\nGIT_WORK_TREE=/var/www/www.example.org git checkout -f" >> hooks/post-receive
chmod 700 hooks/post-receive or
chmod u+x hooks/post-receive
Works like a charm. The only issue I have is that I needed to move the various git users (I have one per team's "stuff" that I host) into the appropriate
www groups, e.g.
xrl-git is now in the
xrl-www group, and the directory for XRL is group-owned by
xrl-www. Now all I need to do is setup tarsnap...
Lojikil's Programmer Notebook |