Re: Why does git track directory listed in .gitignore/".git/info/exclude"?
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jan 23, 2008, 21:17 UTC
- Message-ID
- <alpine.LFD.1.00.0801231313590.2803@woody.linux-foundation.org>
- In-Reply-To
- <6bc632150801230604p2589c893pa05bb6f27e482de8@mail.gmail.com>
On Wed, 23 Jan 2008, pradeep singh rautela wrote:
Show 13 quoted lines
> > Apologies to all.Kindly pardon my novice experiments with git. > Some more trial and error method led to find that you have to put a * > at the end of the directory too. > > i.e xen-3.1.0-src/* > > But i still would like to ask git gurus here. > Isn't it fine to include a directory name as > > $directory_name/ > instead of > $directory_name/*
Heh.
I think your problem is that "/" itself. By adding it, the exclude information does *not* match the directory entry itself (because the directory entry itself is called just "xen-3.1.0-src" - note no slash!), and since you added it, it also doesn't match any names _under_ that directory exactly.
So what you *should* have done is to just tell git to ignore the directory named "xen-3.1.0-src", and you'd have been ok.
Using "xen-3.1.0-src/*" works too, but it is heavy-handed and unnecessary.
Linus