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.
    Tekkub
    Github Tech Support
    http://support.github.com/
    Join us on IRC: #github on freenode.net
    Discussion group: [email protected]


On Fri, Aug 14, 2009 at 5:45 PM, 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. (from
> http://www.kernel.org/pub/software/scm/git/docs/gitignore.html)
>
> What about this:
>
> root/
> !root/dir0/
>
> Seems like the slash matters in some situations.
>
> Chris
>
> On Thu, Aug 13, 2009 at 10:56 PM, Jeenu<[email protected]> wrote:
> >
> > Could someone tell me how do I concisely specify to ignore all
> > subdirectories of 'root' but 'dir0'.
> >
> > root/
> > !root/dir0
> >
> > Later, I did 'git add .' but it seemed to ignore the root/dir0. Or do
> > I have to list out everything I wanted to ignore?
> >
> > Thanks
> > :J
> > >
> >
>
>
>
> --
> Chris Wanstrath
> http://github.com/defunkt
>
> >
>

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

Reply via email to