.gitignore Generator

Generate a .gitignore file by selecting the languages, frameworks, and tools in your project. Each selection adds the relevant ignore patterns for build artifacts, dependency folders, editor files, OS junk, and environment files — the patterns maintained by the gitignore.io community. Copy the result or download it directly as a .gitignore file ready to drop into your repo root.

All processing happens in your browser. No data is sent to any server.

Frequently Asked Questions

What should I include in a .gitignore file?
Build artifacts and compiled output, dependency directories (node_modules, vendor), environment files (.env, .env.local), editor and OS generated files (.DS_Store, Thumbs.db, .idea, .vscode), log files, and any files containing secrets or credentials. Never commit anything that is generated automatically or that varies between machines.
Why is my .gitignore not working for files already tracked?
Git only ignores untracked files. If a file was already committed before you added it to .gitignore, Git will continue to track it. To stop tracking it, run: git rm --cached <file> then commit. After that, future changes to the file will be ignored.
Should I commit my .gitignore file?
Yes. The .gitignore at the repo root should be committed so all collaborators share the same ignore rules. For editor-specific or personal ignores that don't apply to the whole team, use a global gitignore configured in your Git settings (~/.gitignore_global) instead.
Can I have multiple .gitignore files?
Yes. Git applies .gitignore rules from the repository root and from any subdirectory. A .gitignore in a subdirectory only applies to files within that directory — useful for monorepos where different packages have different ignore requirements.

Related Tools