Thread (3 messages) flat view 3 messages, 2 authors, 2026-01-28

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

From: ZH L <hidden>
Date: 2026-01-28 00:42:25

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help