提交 7ed1690c 编写于 作者: W W. Trevor King 提交者: Junio C Hamano

user-manual: use -o latest.tar.gz to create a gzipped tarball

This functionality was introduced by 0e804e09 (archive: provide
builtin .tar.gz filter, 2011-07-21) for v1.7.7.
Signed-off-by: NW. Trevor King <wking@tremily.us>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 632cc3e6
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册