For git there is not even an "export" option anymore (cf. https://stackoverflow.com/questions/160608/do-a-git-export-l...), but nevertheless "git pull/push" is an easy way to keep the production server code synced. It is certainly not the best.
What is the better alternative? Git checkout makes reverting to a previous version fast and convinient, and git's protocol seems more efficient than transmitting the files via scp or similar since most of the files are already there.
I guess I could have a build server rsync the files over, but that seems like a lot of complexity for little gain.
Also, it means that everything you ever committed on the release branch will be available on a more exposed server.
This is a bit complicated to do by hand, but this is probably the best way. I would suggest using existing software to handle this though
Create a file that just has "2" with no quotes in it. Create a directory called 1. Create a symlink that points to that directory. Have the webserver use the symlink instead of the actual code directory.
When you want to update code lock the file that has the number in it. Read in the contents of the file. Replace the contents of the file with the next number. Unlock the file. Create a directory with whatever number you read in. Git clone in that new directory. Do whatever else you need to do (compilation or whatever). If all goes well then change a symlink to point to the new directory.
If you need to revert then change the symlink to the old directory. You could also delete old directories as well to save some space.