Skip to main content

Nested gitignore files

Today I found out that .gitignore files can be nested.

For example the directory tree

a
a/b
.gitignore
a/b/.gitignore

can have files in b ignored by a/b/.gitignore.

This helps split the responsibility of ignoring files by topic and really helps organisation!