# Stop committing files that shouldn’t be in Git

> The .env file, node_modules or build output ended up in the repository.

Web page: https://buildladder.com/resources/prompts/gitignore

What you get: A correct .gitignore, the wrong files no longer tracked, and any exposed secrets flagged.

Paste it into: Your AI tool, in your project

## Prompt to copy

```text
Check what this repository is tracking that it shouldn't.

Look for: environment files with real values, dependency folders, build output, editor and system files, logs, database files, and large media. Show me what you find and how much of the repository's size it accounts for.

Fix the .gitignore for this stack and stop tracking those files without deleting them from my disk. If any file with secrets was ever committed, list each secret by name only and tell me it needs replacing, because removing the file now doesn't remove it from history. Make sure an example environment file with placeholder values is tracked instead.
```
