On Aug 15, 4:45 am, Chris Wanstrath <[email protected]> wrote: > Sounds like you're doing it right: > > An optional prefix ! which negates the pattern; any matching file > excluded by a previous pattern will become included again. If a > negated pattern matches, this will override lower precedence patterns > sources. (fromhttp://www.kernel.org/pub/software/scm/git/docs/gitignore.html)
Just noticed this too: If the pattern ends with a slash, it is removed for the purpose of the following description, but it would only find a match with a directory. In other words, foo/ will match a directory foo and paths underneath it, but will not match a regular file or a symbolic link foo (this is consistent with the way how pathspec works in general in git). It says "it is removed for the purpose of the following description"; would this translate to "consider that directory doesn't exist at all"? But in any case, prefixing a "!" should negate, shouldn't it? But, on the other hand, as mentioned above, if it's considered to be non-existent, how can you even specify that? On Aug 15, 4:50 am, Tekkub <[email protected]> wrote: > Another thing you can try is just ignoring the entire root path, then `git > add` the few files you do want to track. The only issue with this approach > is git won't see new files in that subpath that aren't tracked until you > explicitly git-add them. Yes, it would work, and it has the disadvantage you mentioned. So looks like here I've to hand-pick items to ignore. Thanks :J --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "GitHub" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/github?hl=en -~----------~----~----~----~------~----~------~--~---
