From: Junio C Hamano Date: Mon, 24 Apr 2017 05:07:44 +0000 (-0700) Subject: Merge branch 'tb/doc-eol-normalization' X-Git-Tag: v2.13.0-rc1~34 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/848d9a9bb7407cd3a2d45941f732b2ddc32588a7?hp=-c Merge branch 'tb/doc-eol-normalization' Doc update. * tb/doc-eol-normalization: gitattributes.txt: document how to normalize the line endings --- 848d9a9bb7407cd3a2d45941f732b2ddc32588a7 diff --combined Documentation/gitattributes.txt index a53d093ca1,0b03d91e6b..4736483865 --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@@ -21,11 -21,9 +21,11 @@@ Each line in `gitattributes` file is o pattern attr1 attr2 ... That is, a pattern followed by an attributes list, -separated by whitespaces. When the pattern matches the -path in question, the attributes listed on the line are given to -the path. +separated by whitespaces. Leading and trailing whitespaces are +ignored. Lines that begin with '#' are ignored. Patterns +that begin with a double quote are quoted in C style. +When the pattern matches the path in question, the attributes +listed on the line are given to the path. Each attribute can be in one of these states for a given path: @@@ -88,7 -86,7 +88,7 @@@ is either not set or empty, $HOME/.conf 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 +Sometimes you would need to override a setting of an attribute for a path to `Unspecified` state. This can be done by listing the name of the attribute prefixed with an exclamation point `!`. @@@ -229,11 -227,9 +229,9 @@@ From a clean working directory ------------------------------------------------- $ echo "* text=auto" >.gitattributes - $ rm .git/index # Remove the index to force Git to - $ git reset # re-scan the working directory + $ rm .git/index # Remove the index to re-scan the working directory + $ git add . $ git status # Show files that will be normalized - $ git add -u - $ git add .gitattributes $ git commit -m "Introduce end-of-line normalization" -------------------------------------------------