10 · Version Control

.gitignore

Files git should never track

A list telling git which files to ignore — secrets, build junk, huge files — so they never get committed or shared.

Concrete example

Add “.env” to .gitignore so your API keys never end up public on GitHub.

Why it matters

The first line of defense against leaking secrets into a repo.