How to archive git repository to zip file


Warning: Undefined array key "socialize_RedditWidget" in /home/phpacd/websites/shkodenko.com/wp-content/plugins/socialize/frontend/socialize-services.php on line 166

To archive master branch of git repository into zip file the following commands can be used:

# cd /path/to/repository
# git archive --format zip --output /path/to/backup/repository_backup.zip master

To view list of archived files use command:

# unzip -l /path/to/backup/repository_backup.zip

I have described viewing zip files in my post List files and folders inside Java jar archive.