The very obvious command is
git archive -o latest.zip HEAD creates a Zip archive that contains the contents of the latest commit on the current branch. Note that the output format is inferred by the extension of the output file.
The source is git archive