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

How to unignore files in certain directories?

From
PYPeng Yu <pengyu.ut@gmail.com>
Date
Jul 25, 2012, 15:48 UTC
Message-ID
<CABrM6wk+acut6EaoK=_GuQw3w9vhn_4ONoF21cj1GtEtHFWBKQ@mail.gmail.com>
Hi,
I have the following in .gitignore to ignore *.txt files.
*.txt

But I want to keep the *.txt files in, for example, data/ and all its subdirectories. I don't know should the the correct way to unignore these *.txt files. Could anybody show me the command that I should add to .gitignore? Thanks!

-- 
Regards,
Peng
Next: Junio C Hamano
Message 1 of 2 in “How to unignore files in certain directories?”
  1. Peng YuJul 25, 2012
  2. Junio C HamanoJul 25, 2012

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.