Checkout working copy and publish it. Put into .git/hooks and chmod +x post-update
.git/hooks
chmod +x post-update
For use with bare and non-bare repositories.