NAME
----
-git-archive - Creates a archive of the files in the named tree
+git-archive - Create an archive of files from a named tree
SYNOPSIS
--------
+[verse]
'git-archive' --format=<fmt> [--list] [--prefix=<prefix>/] [<extra>]
- [--remote=<repo>] <tree-ish> [path...]
+ [--remote=<repo> [--exec=<git-upload-archive>]] <tree-ish>
+ [path...]
DESCRIPTION
-----------
Creates an archive of the specified format containing the tree
-structure for the named tree. If <prefix> is specified it is
+structure for the named tree, and writes it out to the standard
+output. If <prefix> is specified it is
prepended to the filenames in the archive.
'git-archive' behaves differently when given a tree ID versus when
-------
--format=<fmt>::
- Format of the resulting archive: 'tar', 'zip'...
+ Format of the resulting archive: 'tar' or 'zip'. The default
+ is 'tar'.
---list::
+--list, -l::
Show all available formats.
+--verbose, -v::
+ Report progress to stderr.
+
--prefix=<prefix>/::
Prepend <prefix>/ to each filename in the archive.
<extra>::
This can be any options that the archiver backend understand.
+ See next section.
--remote=<repo>::
Instead of making a tar archive from local repository,
retrieve a tar archive from a remote repository.
+--exec=<git-upload-archive>::
+ Used with --remote to specify the path to the
+ git-upload-archive executable on the remote side.
+
<tree-ish>::
The tree or commit to produce an archive for.
If one or more paths are specified, include only these in the
archive, otherwise include all files and subdirectories.
+BACKEND EXTRA OPTIONS
+---------------------
+
+zip
+~~~
+-0::
+ Store the files instead of deflating them.
+-9::
+ Highest and slowest compression level. You can specify any
+ number from 1 to 9 to adjust compression speed and ratio.
+
+
CONFIGURATION
-------------
-By default, file and directories modes are set to 0666 or 0777 in tar
-archives. It is possible to change this by setting the "umask" variable
-in the repository configuration as follows :
-
-[tar]
- umask = 002 ;# group friendly
-The special umask value "user" indicates that the user's current umask
-will be used instead. The default value remains 0, which means world
-readable/writable files and directories.
+tar.umask::
+ This variable can be used to restrict the permission bits of
+ tar archive entries. The default is 0002, which turns off the
+ world write bit. The special value "user" indicates that the
+ archiving user's umask will be used instead. See umask(2) for
+ details.
EXAMPLES
--------
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite