Merge branch 'nd/doc-ignore' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 17 Oct 2012 17:28:42 +0000 (10:28 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Oct 2012 17:28:42 +0000 (10:28 -0700)
* nd/doc-ignore:
gitignore.txt: suggestions how to get literal # or ! at the beginning

1  2 
Documentation/gitignore.txt
index 96639e02bd143f73a9eab1dde7fbe175414ee785,14ade3e6a53ebd9a1c9f3397308f723afdb06ef3..1b82fe1969ed1cf965d946178a423771dd3cfe5f
@@@ -41,24 -41,18 +41,24 @@@ precedence, the last matching pattern d
     variable 'core.excludesfile'.
  
  Which file to place a pattern in depends on how the pattern is meant to
 -be used. Patterns which should be version-controlled and distributed to
 -other repositories via clone (i.e., files that all developers will want
 -to ignore) should go into a `.gitignore` file. Patterns which are
 -specific to a particular repository but which do not need to be shared
 -with other related repositories (e.g., auxiliary files that live inside
 -the repository but are specific to one user's workflow) should go into
 -the `$GIT_DIR/info/exclude` file.  Patterns which a user wants git to
 -ignore in all situations (e.g., backup or temporary files generated by
 -the user's editor of choice) generally go into a file specified by
 -`core.excludesfile` in the user's `~/.gitconfig`. Its default value is
 -$XDG_CONFIG_HOME/git/ignore. If $XDG_CONFIG_HOME is either not set or empty,
 -$HOME/.config/git/ignore is used instead.
 +be used.
 +
 + * Patterns which should be version-controlled and distributed to
 +   other repositories via clone (i.e., files that all developers will want
 +   to ignore) should go into a `.gitignore` file.
 +
 + * Patterns which are
 +   specific to a particular repository but which do not need to be shared
 +   with other related repositories (e.g., auxiliary files that live inside
 +   the repository but are specific to one user's workflow) should go into
 +   the `$GIT_DIR/info/exclude` file.
 +
 + * Patterns which a user wants git to
 +   ignore in all situations (e.g., backup or temporary files generated by
 +   the user's editor of choice) generally go into a file specified by
 +   `core.excludesfile` in the user's `~/.gitconfig`. Its default value is
 +   $XDG_CONFIG_HOME/git/ignore. If $XDG_CONFIG_HOME is either not set or
 +   empty, $HOME/.config/git/ignore is used instead.
  
  The underlying git plumbing tools, such as
  'git ls-files' and 'git read-tree', read
@@@ -74,11 -68,15 +74,15 @@@ PATTERN FORMA
     for readability.
  
   - A line starting with # serves as a comment.
+    Put a backslash ("`\`") in front of the first hash for patterns
+    that begin with a hash.
  
-  - An optional prefix '!' which negates the pattern; any
+  - An optional prefix "`!`" which negates the pattern; any
     matching file excluded by a previous pattern will become
     included again.  If a negated pattern matches, this will
     override lower precedence patterns sources.
+    Put a backslash ("`\`") in front of the first "`!`" for patterns
+    that begin with a literal "`!`", for example, "`\!important!.txt`".
  
   - If the pattern ends with a slash, it is removed for the
     purpose of the following description, but it would only find