git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: .gitignore sub-dir exclusions not overriding '*'

From
Duy Nguyen <pclouds@gmail.com>
Date
Nov 19, 2014, 09:48 UTC
Message-ID
<CACsJy8BHvucnEAW065OXOe5NBQkxp7+8HJb7XCGYgOa=pkxLVA@mail.gmail.com>
In-Reply-To
<20141119034010.GA18145@tower.spodhuis.org>

On Wed, Nov 19, 2014 at 10:40 AM, Phil Pennock <phil-gitml@phil.spodhuis.org> wrote:

Show 6 quoted lines
> Expected to work as .gitignore in top-level of repo:
>
>     *
>     !**/*.asc
>     !.gitignore
>

gitignore man page has this "It is not possible to re-include a file if a parent directory of that file is excluded". In this case, directory "foo" is ignored by "*". Although it makes sense for this particular case to re-include something in foo because we can clearly see there are rules to re-include. It's on my todo list, but I don't know when it will be implemented.

-- 
Duy
Previous: Phil PennockNext: Nguyễn Thái Ngọc Duy
Message 2 of 7 in “.gitignore sub-dir exclusions not overriding '*'”
  1. Phil PennockNov 19, 2014
  2. Duy NguyenNov 19, 2014
  3. dir.c: allow re-include after a dir is excluded in some casesNguyễn Thái Ngọc Duy, Nov 19, 2014
  4. Junio C HamanoNov 19, 2014
  5. Duy NguyenNov 20, 2014
  6. Phil PennockNov 19, 2014
  7. Duy NguyenNov 20, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.