Skip to content

Commit

Permalink
archive documentation: attributes are taken from the tree by default
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
gitster committed Feb 12, 2010
1 parent f937421 commit 9b4c8b0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Documentation/git-archive.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 -)::
Expand Down

0 comments on commit 9b4c8b0

Please sign in to comment.