#!/bin/bash set -eu echo "hook -> post-receive" while read oldrev newrev refname; do git --work-tree=".." checkout -f "$newrev" done