_       _ _ _    _ _ 
| |     (_|_) |  (_) |
| | ___  _ _| | ___| |
| |/ _ \| | | |/ / | |
| | (_) | | |   <| | |
|_|\___/| |_|_|\_\_|_|
       _/ |           
      |__/           
    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:
  1. cd /some/path/to/repo
    1. git init --bare
    2. echo "#!/bin/sh\nGIT_WORK_TREE=/var/www/www.example.org git checkout -f" >> hooks/post-receive
      1. 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
      2. 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...

Home | About | Blag | Lojikil's Programmer Notebook | Projects | Twitter | Github | BitBucket