Q:

Post-receive hook that auto deploy newly pushed data?

I'm looking to implement a post-receive script that would deploy my newly pushed data to a local folder.
Using Linux/bash I already done something equivalent, but I use git pull, and I often have conflicts when the local folder have some changes regarding the pull (the website is running).
I don't know if the best way is to keep the pull, or do a reset or something else, better, cleaner?
By the way, would it be possible to automatically deploy the newly pushed data only if I indicate it, without having to make a branche/tag everytime? I'm a newbie with git and I don't know if this is possible.
The reason I'd like this is since a push automatically update the website, I sometime want to save the changes but not everything is fully working.
Thank you really much for your help.

A:

For conflicts in git pull, go use .gitignore.
For controllable deployment, you can put some magic word in your committing log and check that word in your post-receive.

