Skip to content

Commit

Permalink
user-manual: use -o latest.tar.gz to create a gzipped tarball
Browse files Browse the repository at this point in the history
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 <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
W. Trevor King authored and Junio C Hamano committed Feb 18, 2013
1 parent 632cc3e commit 7ed1690
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Documentation/user-manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -931,11 +931,20 @@ The linkgit:git-archive[1] command can create a tar or zip archive from
any version of a project; for example:

-------------------------------------------------
$ git archive --format=tar --prefix=project/ HEAD | gzip >latest.tar.gz
$ git archive -o latest.tar.gz --prefix=project/ HEAD
-------------------------------------------------

will use HEAD to produce a tar archive in which each filename is
preceded by "project/".
will use HEAD to produce a gzipped tar archive in which each filename
is preceded by `project/`. The output file format is inferred from
the output file extension if possible, see linkgit:git-archive[1] for
details.

Versions of Git older than 1.7.7 don't know about the 'tar.gz' format,
you'll need to use gzip explicitly:

-------------------------------------------------
$ git archive --format=tar --prefix=project/ HEAD | gzip >latest.tar.gz
-------------------------------------------------

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

0 comments on commit 7ed1690

Please sign in to comment.