.gitignore
Also called Ignore file
A file listing the names and patterns git should not track, such as dependencies, build output and secrets. Git then behaves as if those files weren't there. It only applies to files git isn't already tracking.
Without one, git add -A commits node_modules and your keys. One line here is a small permanent rule, and better than asking an agent to remember. But it can't undo anything: a secret already committed stays in the history.
Say it to your agent
“Add .env, dist/ and node_modules/ to .gitignore, and run git check-ignore -v .env to prove it matches. If git ls-files shows .env is already tracked, run git rm --cached .env and tell me, because that key needs replacing.”