summaryrefslogtreecommitdiffstats
path: root/git-archive.txt
diff options
context:
space:
mode:
authorJunio C Hamano <junio@hera.kernel.org>2009-09-14 09:40:50 +0000
committerJunio C Hamano <junio@hera.kernel.org>2009-09-14 09:40:50 +0000
commitd6fff4023d7c93e6eb4a0ba3a8a69a646c607f48 (patch)
tree991eda173b857ad31fb8f638387428dc90b61e05 /git-archive.txt
parent7df6dcfdb11ce1e05b12d12ef51d8c8d5b4987a5 (diff)
downloadgit-htmldocs-d6fff4023d7c93e6eb4a0ba3a8a69a646c607f48.tar.gz
Autogenerated HTML docs for v1.6.5-rc1-10-g20f34
Diffstat (limited to 'git-archive.txt')
-rw-r--r--git-archive.txt16
1 files changed, 13 insertions, 3 deletions
diff --git a/git-archive.txt b/git-archive.txt
index 92444ddf1..3d1c1e75b 100644
--- a/git-archive.txt
+++ b/git-archive.txt
@@ -10,7 +10,7 @@ SYNOPSIS
--------
[verse]
'git archive' [--format=<fmt>] [--list] [--prefix=<prefix>/] [<extra>]
- [--output=<file>] [--worktree-attributes]
+ [-o | --output=<file>] [--worktree-attributes]
[--remote=<repo> [--exec=<git-upload-archive>]] <tree-ish>
[path...]
@@ -34,8 +34,11 @@ OPTIONS
-------
--format=<fmt>::
- Format of the resulting archive: 'tar' or 'zip'. The default
- is 'tar'.
+ Format of the resulting archive: 'tar' or 'zip'. If this option
+ is not given, and the output file is specified, the format is
+ inferred from the filename if possible (e.g. writing to "foo.zip"
+ makes the output to be in the zip format). Otherwise the output
+ format is `tar`.
-l::
--list::
@@ -48,6 +51,7 @@ OPTIONS
--prefix=<prefix>/::
Prepend <prefix>/ to each filename in the archive.
+-o <file>::
--output=<file>::
Write the archive to <file> instead of stdout.
@@ -129,6 +133,12 @@ git archive --format=zip --prefix=git-docs/ HEAD:Documentation/ > git-1.4.0-docs
Put everything in the current head's Documentation/ directory
into 'git-1.4.0-docs.zip', with the prefix 'git-docs/'.
+git archive -o latest.zip HEAD::
+
+ Create a Zip archive that contains the contents of the latest
+ commit on the current branch. Note that the output format is
+ inferred by the extension of the output file.
+
SEE ALSO
--------