GIT howto do auto publish ?

Target : how to do publish from BARE repo to production target (dir/folder) ?

Decision : Look to /your/bare/repo/hooks folder. There are many useful files, which you can use for your own purpose

For my situation i use post-receive which contain following :

cd /var/www/my-site1-wwwdocs/ && env -i git pull /home/userXXX/git/www.site1.bare master

What doest it mean ?
1. I change current folder to that which is my target aim (production version of site)
2. I “git pull” from BARE REPO to current folder.
What`s all.

PS : folder /var/www/my-site1-wwwdocs/ should be git repo (u should use before
“git clone /home/userXXX/git/www.site1.bare/ . ” )