On Thursday, February 21, 2013 12:15:57 AM UTC+1, Dale Worley wrote:

> > From: John McKown <john.arch...@gmail.com <javascript:>> 
> > 
> > I take it WEB-INF is a subdirectory? Did you terminate it with a slash? 
> > 
> > I.e. use 
> > 
> > WEB-INF/ 
> > 
> > and not 
> > 
> > WEB-INF 
>
> My experience is that a trailing slash is not necessary to cause a 
> .gitignore entry to match a directory. 
>
> Dale 
>


But with trailing slash, it will match *only* directories (and not 
accidentally files with the same name).

Another interesting detail is that ignore expressions apply for every 
subdirectory in the repo (recursive), but if you want to only match on a 
distinct path/level, start with a slash.

For instance, for only matching the *directory* /foo at the *root* of your 
repository (repo/foo), use this pattern:

/foo/

 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to