Back to Glossary

.gitignore

The Quick Version

A list of files Git should pretend do not exist.

How it actually works

Every pattern in .gitignore excludes matching files from being tracked or committed — typically node_modules, build output and .env files.

Why does it matter?

It is the single line of defence between your database password and the public internet.

Example

.env node_modules/ dist/