Hello. I'm Dean Clatworthy

I build websites for a living. PHP/MySQL, Javascript, CSS, HTML5

04 January 2013

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:

  1. Make sure that your work is committed.
  2. 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.



blog comments powered by Disqus