I am currently learning how to use git and already became friends with this beautiful tool. Right now, I am converting all my "normal" projects to local git projects, including establishing a branching model I found and consider useful. In this model, the master branch is only used for production releases and the development is done mainly in a development branch (see http://nvie.com/posts/a-successful-git-branching-model/)
My git repositories and my working directory are in
/data/projects/working/{PROJECT}/
I need to deliver every finished release to my customers, so it would be extremly convenient to have a delivery-ready version of my code being prepared automatically everytime a branch is merged to the master-branch of my project (which is equivalent to releasing a production-ready version). In praxis, this means, that, after a merge to "master", all the files in the master branch (except for the .git-directory), should be copied to
/data/projects/release/{PROJECT}/
after wiping the contents of that folder. I allready came along the git hooks, escpecially the post-merge hook. What I couldn't figure out is how to professionally get the raw contents (no git-files) from the master-branch and copy them to a given directory without it being a git repository itself. Simply copying the work-directories contents doesn't seem very failproof to me.
Looking forward to your support and thanks in advance! Greetings, Jonathan