This is a brief note on how to export the last revision of your git repository to a directory or archive file.
For instance, lets say you have already the latest version of your website in the last commit on you git repo and now you would like to deploy the files from the repo to the live website folder directory on your Apache server, run the following
git archive master | tar -x -C ~/mysite
- if you want to export/archive a different branch
If instead you would like to export the files into an archive you can run
for ZIP archives:
git help archive for more details, if you need extra details or help.