.gitignore Generator
Build a .gitignore file in seconds — pick your languages, frameworks, editors, and OS (Node, Python, PHP, macOS, VS Code and more) and copy or download it. Free.
💡 How to use
- Click the languages, frameworks, and operating systems your project uses.
- The combined rules appear instantly — copy them or download the file.
- Save it as
.gitignorein the root of your repository.
Free .gitignore Generator
Build a .gitignore file in seconds. Pick your languages, frameworks, editors, and operating systems, and get a combined, ready-to-use .gitignore you can copy or download. Covers Node, Python, PHP, Laravel, React, Next.js, macOS, Windows, VS Code, JetBrains, and more. Free, no sign-up.
What is a .gitignore file?
A .gitignore file tells Git which files and folders to leave out of version control. It keeps your repository clean by excluding things that should never be committed — dependency folders like node_modules, build output, log files, editor settings, operating-system junk like .DS_Store, and secret files such as .env. A good .gitignore keeps your repo small, avoids leaking credentials, and prevents noisy diffs.
How to use the .gitignore generator
It takes seconds:
- Click the languages and frameworks your project uses (Node, Python, PHP, and so on).
- Add your editor (VS Code, JetBrains) and operating systems (macOS, Windows, Linux).
- The combined rules appear instantly, grouped and labelled.
- Copy the result or download it as a ready-named .gitignore file.
Where to put the .gitignore file
Save the file as .gitignore (note the leading dot and no extension) in the root folder of your repository. Git applies its rules to that folder and everything beneath it. You can also place additional .gitignore files in subfolders for more specific rules. Add it before your first commit so ignored files never get tracked in the first place.
Common things you should ignore
Across almost every project, a few categories belong in .gitignore:
- Dependencies — node_modules, vendor, and other installed packages.
- Build output — dist, build, target, and compiled files.
- Secrets — .env files, keys, and credentials (never commit these).
- Logs and caches — *.log, coverage reports, and temporary files.
- OS and editor files — .DS_Store, Thumbs.db, .vscode, and .idea.
What if a file is already tracked?
Adding a path to .gitignore only stops Git from tracking files that are not already tracked. If you have already committed a file you now want to ignore, add it to .gitignore and then remove it from tracking with git rm --cached, followed by a commit. This is especially important for secrets — if a .env or key file was ever committed, you should also rotate those credentials, since they remain in the repository history.
Pro tip
Combine every environment your project touches — for example Node plus macOS plus VS Code — so nobody on the team accidentally commits their editor or OS files. Keep .gitignore under version control itself so the whole team shares the same rules. For related workflows, see our other developer tools like the JSON Formatter and SHA-256 Hash Generator.
FAQ
Is this .gitignore generator free?
Where do I save the .gitignore file?
Can I combine multiple languages and tools?
Why is a file still showing up after I ignored it?
Should I commit the .gitignore file?
How do I ignore a whole folder?
Does .gitignore protect secrets that were already committed?
Related tools
Pro tip: pair this tool with Upside Down Text Generator and Text Similarity Checker for a faster SEO workflow.