Skip to content

Commit 7ed1690

Browse files
wkinggitster
authored andcommitted
user-manual: use -o latest.tar.gz to create a gzipped tarball
This functionality was introduced by 0e804e0 (archive: provide builtin .tar.gz filter, 2011-07-21) for v1.7.7. Signed-off-by: W. Trevor King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 632cc3e commit 7ed1690

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

Documentation/user-manual.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -931,11 +931,20 @@ The linkgit:git-archive[1] command can create a tar or zip archive from
931931
any version of a project; for example:
932932

933933
-------------------------------------------------
934-
$ git archive --format=tar --prefix=project/ HEAD | gzip >latest.tar.gz
934+
$ git archive -o latest.tar.gz --prefix=project/ HEAD
935935
-------------------------------------------------
936936

937-
will use HEAD to produce a tar archive in which each filename is
938-
preceded by "project/".
937+
will use HEAD to produce a gzipped tar archive in which each filename
938+
is preceded by `project/`. The output file format is inferred from
939+
the output file extension if possible, see linkgit:git-archive[1] for
940+
details.
941+
942+
Versions of Git older than 1.7.7 don't know about the 'tar.gz' format,
943+
you'll need to use gzip explicitly:
944+
945+
-------------------------------------------------
946+
$ git archive --format=tar --prefix=project/ HEAD | gzip >latest.tar.gz
947+
-------------------------------------------------
939948

940949
If you're releasing a new version of a software project, you may want
941950
to simultaneously make a changelog to include in the release

0 commit comments

Comments
 (0)