git archive <tree-ish> [path...]

Create an archive of files from a named tree

Arguments

NameDescription
tree-ish
pathfilepaths

Options

NameDescription
--format <fmt>Archive format
--prefix <prefix>Prepend prefix to each pathname in the archive
--add-file <file>Add untracked file to archive
-o, --output <file>Write the archive to this file
--worktree-attributesRead .gitattributes in working directory
-v, --verboseReport archived files on stderr
-NUMSet compression level
-l, --listList supported archive formats
--remote <repo>Retrieve the archive from remote repository <repo>
--exec <command>Path to the remote git-upload-archive command