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.

Setting Paste and Match Style as default in Scrivner on OSX

How to set paste and match style as default in Scrivner. Continue reading

Billy Graham on Technology

Published on February 21, 2018

Music Picks of 2017

Published on January 01, 2018