What is a .gitignore file?
A .gitignore file tells Git which files and folders to ignore — things like build output, dependencies (node_modules), environment files, and editor settings that shouldn’t be committed. Keeping these out of version control keeps your repository clean and avoids leaking secrets.
Start clean
Rather than remembering every cache folder and OS file, select your stack and get a sensible combined ignore list. Toggle templates on and off and copy the result into your project root.