So as I have been increasing movingly my life into Git version control it made sense to explore methods of publishing with Git.

Turns out to be quite simple.

On the web server

Create a folder to host live site (live)

mkdir live

Create a folder to host git repository (repo)

mkdir repo

Create git bare repository in folder (repo)

cd repo
git init --bare

Within the hooks folder create a file called post-receive

nano hooks/post-receive

with the following text

#! /bin/sh
GIT_WORK_TREE="../live" git checkout -f

Now ensure the folder live is writable by the web server and that the file post-receive is executable. This hooks means that when the repository is committed to it will check out the files to the live web directory.

On the local box

Now on the box that the files exisit all you need to do is add a new remote (I tend to call it web but it can be called anything).

git remote add web *your-remote-url*

and then when you push the files will be made live.

Review The Second Machine Age

A quick review of The Second Machine Age. Continue reading

Threads by Ruth Notman a great folk album

Published on July 16, 2017

MuSA 2017 Karlsruhe

Published on July 11, 2017