I’ll keep this short and sweet. This bash alias will allow you to export your git repo’s master branch to a zip file.
To use it:
- Make sure that your work is committed.
- Make sure you are in the root directory of your project.
To make this script work run the following commands:
echo alias gitpack=\'git archive --format zip --output download_$(date +%d-%m-%Y-%H.%M).zip master\' >> ~/.bashrc
source ~/.bashrc
Now just type gitpack
and you will get a zip file.