Skip to content
Novus Examples
gitignore

What is a .gitignore file?

text/plain

A .gitignore file tells Git which untracked paths to leave alone. Each line is a pattern: a leading `/` anchors it to the containing directory, a trailing `/` restricts it to directories, `!` re-includes a previously excluded path, `**` matches across directory boundaries, and `#` introduces a comment. Rules are evaluated in order, with the last matching pattern winning, and nested .gitignore files layer on top of parent ones.

How to use a .gitignore file

Use an example .gitignore file to test ignore-pattern engines in build tools, bundlers, linters, and container builders, checking negation ordering, anchored versus floating patterns, and directory-only rules against a documented set of expected matches.

Download example .gitignore files

Convert a .gitignore file to another format

← All file formats