How do I export my project as a .zip of git repository?
GitZipExportGit Problem Overview
I was recently asked to export as a .zip
file one of my projects on my Git repository.
I have actually never had to do this in the 4 years I have been using Git.
I would prefer an answer that is all done inside command line terminal.
Git Solutions
Solution 1 - Git
git archive --format zip --output /full/path/to/zipfile.zip master
Solution 2 - Git
Following code might help if you want to include .git/ too and don't want to include other extra files which haven't been tracked by git. Suppose the path of your git project is /opt/some-project/, commit whatever are left, then you can do as the following:
git clone /opt/helloworld/ folder2
cd folder2
tar -czf helloworld-latest.zip folder2