— micro.blog snippet —

A deer just bounced past us on our after lunch stroll. The perks of living on the countryside.

More info on micro.blog.

— micro.blog snippet —

Willow laughed for the first time. The first laugh has something magical.

More info on micro.blog.

— micro.blog snippet —

Looks like I went to bed too late last night. So I’m calling it a day for today and am catching up on some rest

More info on micro.blog.

Git Hooks and Merging Changes

Reading Time: 0 minute, 26 seconds

Any Git experts around? I am trying to modify the way my site gets updated. Right now I am using a post-receive hook to checkout the most recent commit. And that works great, but with the micro.blog iOS app I was thinking about using that for posting. Only problem is that this is not going to end up in my repo and is being overwritten with the post-receive hook every time I push something to the repo.

Right now I am using this hook:

#!/bin/sh
WEB_DIR=/home/user/public_html/pathtoblog

# remove any untracked files and directories
git --work-tree=${WEB_DIR} clean -fd

# force checkout of the latest deploy
git --work-tree=${WEB_DIR} checkout master --force

Is there a way to modify this so it does not clean WEB_DIR but instead commit/merge any changes from WEB_DIR before checkout?

— micro.blog snippet —

Second day at FMX and I’m looking forward to some nice sessions and even more fun with friends.

More info on micro.blog.