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

gitignore: how to exclude a directory tree from being ignored

From
PPeter <vmail@mycircuit.org>
Date
Oct 1, 2009, 11:07 UTC
Message-ID
<4AC48D5F.6060401@mycircuit.org>

Hi I want to exclude binaries except in a dir tree that I do not control.

In .gitignore  I have:

!vendor/ *.exe *.o

I would expect that all *.exe and *.o are ignored except those somewhere in the vendor dir tree. However, the *.exe and *.o in the vendor dir tree are also ignored.

What is wrong ? Thanks for you help P

Next: Johannes Sixt
Message 1 of 7 in “gitignore: how to exclude a directory tree from being ignored”
  1. PeterOct 1, 2009
  2. Johannes SixtOct 1, 2009
  3. PeterOct 1, 2009
  4. Johannes SixtOct 1, 2009
  5. PeterOct 1, 2009
  6. Johannes SixtOct 1, 2009
  7. PeterOct 1, 2009

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.