Git command `archive`
Definition
Create an archive of files from a named tree.
Expert usage
Create a tarball archive from <object> (branch, tag, commit,
HEAD
, …)$ git archive <object> | gzip > <archive>.tar.gz
Create a zip archive from <object> (branch, tag, commit,
HEAD
, …)$ git archive <object> --format=zip > <archive>.zip
Create an archive from <object>’s
subdir $ git archive <object> --prefix='<path>/' | gzip > <archive>.tar.gz $ git archive <object> --prefix='<path>/' --format=zip > <archive>.zip