FileSamplesHub

Sample GITIGNORE File Download

Sample gitignore file

A .gitignore file lists path patterns Git should not track — build output, dependency folders, local env files, editor junk. Each line is a glob; a leading ! re-includes a match, a trailing / matches directories only.

Every Git repository uses one, and the pattern syntax is shared by related ignore files (.dockerignore, .npmignore, .eslintignore), so a correct reference is broadly useful.

Use the samples below to test a gitignore pattern matcher, check what a tool would exclude, or start from a sensible baseline for a Node, Python, or monorepo project.

Related file formats