git archive

Create an archive of files from a tree. More information: https://git-scm.com/docs/git-archive.

git archive {{-v|--verbose}} HEAD

git archive {{-v|--verbose}} --format zip HEAD

git archive {{-v|--verbose}} {{-o|--output}} {{path/to/file.zip}} HEAD

git archive {{-o|--output}} {{path/to/file.tar}} {{branch_name}}

git archive {{-o|--output}} {{path/to/file.tar}} HEAD:{{path/to/directory}}

git archive {{-o|--output}} {{path/to/file.tar}} --prefix {{path/to/prepend}}/ HEAD