summaryrefslogtreecommitdiffstats
path: root/gitignore.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-07 14:24:28 -0700
committerJunio C Hamano <gitster@pobox.com>2015-10-07 14:24:28 -0700
commit6fbdfc93ce6e337fa789094729683499fcf3a01d (patch)
tree031e533ebaf5e1f547de2d74cfc343fabe6c96ca /gitignore.html
parent1eb5609b6b3e2908ee747dfe313c24f17334ce26 (diff)
downloadgit-htmldocs-6fbdfc93ce6e337fa789094729683499fcf3a01d.tar.gz
Autogenerated HTML docs for v2.6.1-133-gf5b60
Diffstat (limited to 'gitignore.html')
-rw-r--r--gitignore.html38
1 files changed, 33 insertions, 5 deletions
diff --git a/gitignore.html b/gitignore.html
index 235677aea..8362418d7 100644
--- a/gitignore.html
+++ b/gitignore.html
@@ -858,12 +858,12 @@ Trailing spaces are ignored unless they are quoted with backslash
<p>
An optional prefix "<code>!</code>" which negates the pattern; any
matching file excluded by a previous pattern will become
- included again. It is not possible to re-include a file if a parent
- directory of that file is excluded. Git doesn&#8217;t list excluded
- directories for performance reasons, so any patterns on contained
- files have no effect, no matter where they are defined.
+ included again.
Put a backslash ("<code>\</code>") in front of the first "<code>!</code>" for patterns
that begin with a literal "<code>!</code>", for example, "<code>\!important!.txt</code>".
+ It is possible to re-include a file if a parent directory of that
+ file is excluded if certain conditions are met. See section NOTES
+ for detail.
</p>
</li>
<li>
@@ -944,6 +944,34 @@ Other consecutive asterisks are considered invalid.
not tracked by Git remain untracked.</p></div>
<div class="paragraph"><p>To stop tracking a file that is currently tracked, use
<em>git rm --cached</em>.</p></div>
+<div class="paragraph"><p>To re-include files or directories when their parent directory is
+excluded, the following conditions must be met:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+The rules to exclude a directory and re-include a subset back must
+ be in the same .gitignore file.
+</p>
+</li>
+<li>
+<p>
+The directory part in the re-include rules must be literal (i.e. no
+ wildcards)
+</p>
+</li>
+<li>
+<p>
+The rules to exclude the parent directory must not end with a
+ trailing slash.
+</p>
+</li>
+<li>
+<p>
+The rules to exclude the parent directory must have at least one
+ slash.
+</p>
+</li>
+</ul></div>
</div>
</div>
<div class="sect1">
@@ -1019,7 +1047,7 @@ everything within <code>foo/bar</code>):</p></div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2015-03-23 14:31:16 PDT
+Last updated 2015-10-07 14:23:59 PDT
</div>
</div>
</body>