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

git exclude patterns for directory

From
JBjimmy bahuleyan <jimmy.cancer@gmail.com>
Date
Jun 19, 2007, 20:08 UTC
Message-ID
<20070619200821.GA16423@camelot>
(Please Cc on replies)

I just started using git (yes, newbie ;) and hit a problem that i cant seem to solve.

Is there a way where I could specify a pattern in .git/info/exclude that would make git ignore directories.

Suppose I had in each of my project's sub-directories a directory called 'IGNORE/', how do I make git ignore this directory (and all it's contents)?

I tried putting in
IGNORE/*
but this only takes care of the directory in the root dir. Then I tried
*/IGNORE/*

which doesn't work for dirs at >1 depth. I did read gitignore man page (and it looks impossible .. ):

So, is there any way I can do this without adding a gitignore file in each of my sub-directories?

-jb
-- 
Tact is the art of making a point without making an enemy.
Next: Alex Riesen
Message 1 of 2 in “git exclude patterns for directory”
  1. jimmy bahuleyanJun 19, 2007
  2. Alex RiesenJun 19, 2007

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.