Re: negated list in .gitignore no fun
- From
Boyd Stephen Smith Jr. <bss@iguanasuicide.net>
- Date
- Dec 18, 2008, 22:34 UTC
- Message-ID
- <200812181634.51351.bss@iguanasuicide.net>
- In-Reply-To
- <87hc51tajw.fsf@jidanni.org>
On Thursday 2008 December 18 15:53:23 jidanni@jidanni.org wrote:
Show 9 quoted lines
> # head -n 5 .gitignore > * > !X11/xorg.conf > !anacrontab > !apt/apt.conf.d/10jidanni > !apt/sources.list > # git-add . > But git-status only shows anacrontab got added. None of the files in > the subdirectories get added.
That's by design. You've chosen to ignore those directories; they match "*" themselves. Thus, 'git add .' doesn't descend into them looking for files.
I wouldn't want to change this behavior because I'll often use a "build" directory and put all generated files in it and just ignore that directory with a single line in .gitignore.
I think the .gitignore you really want is: * !X11 !X11/xorg.conf !anacrontab !apt !apt/apt.conf.d !apt/apt.conf.d/10jidanni !apt/sources.list [...]
But, I haven't tested that.
-- Boyd Stephen Smith Jr. ,= ,-_-. =. bss@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/