Skip to content

Commit 8ad3cb0

Browse files
committed
Revert "Merge branch 'jc/exclusion-doc'"
This reverts commit e80aae5, reversing changes made to 68846a9. We will be postponing nd/exclusion-regression-fix topic to later cycle.
1 parent 44915db commit 8ad3cb0

File tree

1 file changed

+1
-37
lines changed

1 file changed

+1
-37
lines changed

Documentation/gitignore.txt

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -148,43 +148,7 @@ excluded, the following conditions must be met:
148148
be in the same .gitignore file.
149149

150150
- 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)
188152

189153
EXAMPLES
190154
--------

0 commit comments

Comments
 (0)