Export a Git branch (to ZIP)
The beloved command:
git archive --format zip --output /full/path/to/zipfile.zip master
And if you'd like to define a specific top level directory (name) to be extracted... you can use this command:
git archive --format zip --output /path/to/file.zip --prefix=newdir/ master
(The output will be called 'file.zip' but when you unpack it, the top level directory will be 'newdir'.)
Written by Wouter Martens
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#