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

Question: supporting multiple named ignore files (in addition to .gitignore)

From
ZLZH L <lzh2587379717@gmail.com>
Date
Jan 28, 2026, 00:42 UTC
Message-ID
<CA+5Chmhwcz=gOQHW18_w+uYojshjFj8MCE+srUpJgEhbh8J09w@mail.gmail.com>

Today Git only loads ignore rules from .gitignore (plus global and info/exclude), which works well but can become hard to maintain in large repositories where editor, build, and miscellaneous rules are mixed into a single file.

Would the Git project consider supporting additional named ignore files (for example editor.gitignore, build.gitignore) that are automatically merged with .gitignore, with a well-defined and documented precedence order?

This would allow semantic separation of ignore rules while keeping full backward compatibility, and could reduce the need for external scripts that currently exist solely to generate .gitignore.

I’m mainly interested in whether this idea has been considered before, and whether the maintainers see fundamental design objections to it.

Next: brian m. carlson
Message 1 of 3 in “Question: supporting multiple named ignore files (in addition to .gitignore)”
  1. ZH LJan 28, 2026
  2. brian m. carlsonJan 28, 2026
  3. ZH LJan 28, 2026

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.