Revert "Merge branch 'jc/exclusion-doc'"
This reverts commit e80aae51f2be908e37fca47ea0dff6d7861c8497, reversing changes made to 68846a92eafa6b2bfae778d0a656443a9fa61e59. We will be postponing nd/exclusion-regression-fix topic to later cycle.
Junio C Hamano committed
Mar 18, 2016 at 11:05 UTC
8ad3cb08690bdf9a340e47ed4fdb67cbacd1edf2
1 file changed
+1
-37
Documentation/gitignore.txt
+1
-37
@@ -148,43 +148,7 @@ excluded, the following conditions must be met:
148
be in the same .gitignore file.
149
150
- The directory part in the re-include rules must be literal (i.e. no
151
- wildcards and has to start with a `/`).
152
-
153
-A re-inclusion of a directory makes all files in the directory
154
-unignored. For example, suppose you have files `.gitignore`,
155
-`dir/file1`, `dir/file2`, and `dir/file3`, and have the following in
156
-your `.gitignore`:
157
-
158
-----------------
159
-# .gitignore is not mentioned in .gitignore
160
-*
161
-!/dir
162
-# dir/file1 is not mentioned in .gitignore
163
-dir/file2
164
-!dir/file3
165
-----------------
166
-
167
-Then:
168
-
169
- - `.gitignore` gets ignored, because it matches the `*` at the top
170
- level;
171
-
172
- - `dir/file1` does not get ignored, because `/dir` marks everything
173
- underneath `dir/` directory to be 're-included' unless otherwise
174
- specified;
175
-
176
- - `dir/file2` gets ignored, because `dir/file2` matches it.
177
-
178
- - `dir/file3` does not get ignored, because `!dir/file3` matches it.
179
- Note that the entry `!dir/file3` is redundant because everything
180
- underneath `dir/` is marked to be 're-included' already.
181
-
182
-Some earlier versions of Git treated `!/dir` above differently in
183
-that it did not cause the paths under it unignored (but merely told
184
-Git that patterns that begin with dir/ should not be ignored), but
185
-this has been corrected to be consistent with `/dir` that says "the
186
-directory `dir/` and everything below are ignored."
187
-
151
+ wildcards)
152
153
EXAMPLES
154
--------