I have some php code in a git repository. I use that code in multiple vhosts on the same web server, but different vhosts may use different versions of the code.
How can I create copies of the files from a specific tag in the various vhost httpdocs directories, but without having to replicate the .git directory for each one?
I realise I could git clone/git checkout tag for each vhost, and just delete the .git directory, or use git archive and then unpack the files, but I am assuming/hoping there is a 'proper' git way to do this... something like git archive, but where the files are copied directly to the required location.