Using 'git pull' vs 'git checkout -f' for website deployment
- by Michelle
I've found two common approaches to automatically deploying website updates using a bare remote repo.
The first requires that the repo is cloned into the document root of the webserver and in the post-update hook a git pull is used.
cd /srv/www/siteA/ || exit
unset GIT_DIR
git pull hub master
The second approach adds a 'detached work tree' to…