X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-archive.txt;h=4163a1bcb1643e7f05b6a79034ac9f63135d6ac9;hb=67976c65e0e931ad73ec21e5effe3dc204003df4;hp=e57979198ba880379056189860275724eec7fd3e;hpb=11a1a49a16a52ff9b684a430d68b8982ed313427;p=git.git diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt index e57979198..4163a1bcb 100644 --- a/Documentation/git-archive.txt +++ b/Documentation/git-archive.txt @@ -12,7 +12,7 @@ SYNOPSIS 'git archive' [--format=] [--list] [--prefix=/] [] [-o | --output=] [--worktree-attributes] [--remote= [--exec=]] - [path...] + [...] DESCRIPTION ----------- @@ -21,13 +21,13 @@ structure for the named tree, and writes it out to the standard output. If is specified it is prepended to the filenames in the archive. -'git-archive' behaves differently when given a tree ID versus when +'git archive' behaves differently when given a tree ID versus when given a commit ID or tag ID. In the first case the current time is used as the modification time of each file in the archive. In the latter case the commit time as recorded in the referenced commit object is used instead. Additionally the commit ID is stored in a global extended pax header if the tar format is used; it can be extracted -using 'git-get-tar-commit-id'. In ZIP files it is stored as a file +using 'git get-tar-commit-id'. In ZIP files it is stored as a file comment. OPTIONS @@ -73,7 +73,7 @@ OPTIONS :: The tree or commit to produce an archive for. -path:: +:: Without an optional path parameter, all files and subdirectories of the current working directory are included in the archive. If one or more paths are specified, only these are included. @@ -112,6 +112,14 @@ export-subst:: expand several placeholders when adding this file to an archive. See linkgit:gitattributes[5] for details. +Note that attributes are by default taken from the `.gitattributes` files +in the tree that is being archived. If you want to tweak the way the +output is generated after the fact (e.g. you committed without adding an +appropriate export-ignore in its `.gitattributes`), adjust the checked out +`.gitattributes` file as necessary and use `--work-tree-attributes` +option. Alternatively you can keep necessary attributes that should apply +while archiving any tree in your `$GIT_DIR/info/attributes` file. + EXAMPLES -------- git archive --format=tar --prefix=junk/ HEAD | (cd /var/tmp/ && tar xf -)::