<p>\r
if it does not contain a slash <em>/</em>, it is a shell glob\r
pattern and used to match against the filename without\r
- leading directories (i.e. the same way as the current\r
- implementation).\r
+ leading directories.\r
</p>\r
</li>\r
<li>\r
--exclude-from=.git/ignore \\r
--exclude-per-directory=.gitignore</tt></pre>\r
</div></div>\r
+<p>Another example:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt> $ cat .gitignore\r
+ vmlinux*\r
+ $ ls arch/foo/kernel/vm*\r
+ arch/foo/kernel/vmlinux.lds.S\r
+ $ echo '!/vmlinux*' >arch/foo/kernel/.gitignore</tt></pre>\r
+</div></div>\r
+<p>The second .gitignore keeps <tt>arch/foo/kernel/vmlinux.lds.S</tt> file\r
+from getting ignored.</p>\r
</div>\r
<h2>See Also</h2>\r
<div class="sectionbody">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 05-May-2006 23:14:13 UTC\r
+Last updated 08-Jun-2006 03:41:12 UTC\r
</div>\r
</div>\r
</body>\r
- if it does not contain a slash '/', it is a shell glob
pattern and used to match against the filename without
- leading directories (i.e. the same way as the current
- implementation).
+ leading directories.
- otherwise, it is a shell glob pattern, suitable for
consumption by fnmatch(3) with FNM_PATHNAME flag. I.e. a
--exclude-per-directory=.gitignore
--------------------------------------------------------------
+Another example:
+
+--------------------------------------------------------------
+ $ cat .gitignore
+ vmlinux*
+ $ ls arch/foo/kernel/vm*
+ arch/foo/kernel/vmlinux.lds.S
+ $ echo '!/vmlinux*' >arch/foo/kernel/.gitignore
+--------------------------------------------------------------
+
+The second .gitignore keeps `arch/foo/kernel/vmlinux.lds.S` file
+from getting ignored.
+
See Also
--------