> From: wtriker....@gmail.com
> 
> I have some files that I want to ignore but can't seem to come up with the 
> correct format. There are multiple sub-directories with the same path that 
> I want to ignore. Specifically, the are '<someupper path>/system/cache' and 
> all start with 'cache.'. The .gitignore entry I am using is:
> 
> system/cache/cache.*
> 
> But that does not work. What is the correct syntax to ignore these files? 

One solution is to put "cache" in each <someupper
path>/system/.gitignore file.

I would start by reading the rules for how gitignore entries are
interpreted, which is in the "gitignore" manual page.  In particular,
I see:

       Two consecutive asterisks ("**") in patterns matched against full
       pathname may have special meaning:

       ยท   A leading "**" followed by a slash means match in all directories.
           For example, "**/foo" matches file or directory "foo" anywhere, the
           same as pattern "foo". "**/foo/bar" matches file or directory "bar"
           anywhere that is directly under directory "foo".

This suggests the answer is to put "**/system/cache" in the top-level
.gitignore file.

Dale

-- 
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