summaryrefslogtreecommitdiff
path: root/Documentation/git-archive.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-02-10 20:33:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-02-12 17:38:20 (GMT)
commit9b4c8b0ae8a71535ff03a4ad88ac8ad67d58d845 (patch)
tree64d9b1d285a9981ddf34314d495af9dfcbc98adb /Documentation/git-archive.txt
parentf93742170248127eec46e6d1afc65da2919480db (diff)
downloadgit-9b4c8b0ae8a71535ff03a4ad88ac8ad67d58d845.zip
git-9b4c8b0ae8a71535ff03a4ad88ac8ad67d58d845.tar.gz
git-9b4c8b0ae8a71535ff03a4ad88ac8ad67d58d845.tar.bz2
archive documentation: attributes are taken from the tree by default
By default, git-archive takes attributes from the tree being archived. People however often wonder why their attempts to affect the way how the command archives their tree by changing .gitattributes in their work tree fail. Add a bit of explanatory note to tell them how to achieve what they want to do. Noticed-by: Francois Marier Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-archive.txt')
-rw-r--r--Documentation/git-archive.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt
index 799c8b6..8d3e666 100644
--- a/Documentation/git-archive.txt
+++ b/Documentation/git-archive.txt
@@ -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 -)::