aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/gitattributes.txt
diff options
context:
space:
mode:
authorPetr Onderka <gsvick@gmail.com>2010-09-01 00:42:43 +0200
committerJunio C Hamano <gitster@pobox.com>2010-09-01 12:19:36 -0700
commit6df42ab98480dcac473ca7d701cfca4a0051d0c1 (patch)
tree7b0f2000cf0d92335e966838eb77bb37f09f51d9 /Documentation/gitattributes.txt
parent64fdc08dac6694d1e754580e7acb82dfa4988bb9 (diff)
downloadgit-6df42ab98480dcac473ca7d701cfca4a0051d0c1.tar.gz
Add global and system-wide gitattributes
Allow gitattributes to be set globally and system wide. This way, settings for particular file types can be set in one place and apply for all user's repositories. The location of system-wide attributes file is $(prefix)/etc/gitattributes. The location of the global file can be configured by setting core.attributesfile. Some parts of the code were copied from the implementation of the same functionality in config.c. Signed-off-by: Petr Onderka <gsvick@gmail.com> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/gitattributes.txt')
-rw-r--r--Documentation/gitattributes.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 564586b943..c6bdeae66d 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -62,14 +62,21 @@ consults `$GIT_DIR/info/attributes` file (which has the highest
precedence), `.gitattributes` file in the same directory as the
path in question, and its parent directories up to the toplevel of the
work tree (the further the directory that contains `.gitattributes`
-is from the path in question, the lower its precedence).
+is from the path in question, the lower its precedence). Finally
+global and system-wide files are considered (they have the lowest
+precedence).
If you wish to affect only a single repository (i.e., to assign
-attributes to files that are particular to one user's workflow), then
+attributes to files that are particular to
+one user's workflow for that repository), then
attributes should be placed in the `$GIT_DIR/info/attributes` file.
Attributes which should be version-controlled and distributed to other
repositories (i.e., attributes of interest to all users) should go into
-`.gitattributes` files.
+`.gitattributes` files. Attributes that should affect all repositories
+for a single user should be placed in a file specified by the
+`core.attributesfile` configuration option (see linkgit:git-config[1]).
+Attributes for all users on a system should be placed in the
+`$(prefix)/etc/gitattributes` file.
Sometimes you would need to override an setting of an attribute
for a path to `unspecified` state. This can be done by listing