.gitignore Generator
Generate .gitignore files for various project types.
Build a .gitignore file for your project by ticking what it uses: languages and frameworks (Node.js, Python, Java, Go, Rust, C and C++, .NET, Ruby, PHP, Swift, Android, Next.js, Vite, Django, Unity, Flutter), tools (Terraform, Docker), operating systems (macOS, Windows, Linux) and editors (VS Code, JetBrains, Vim). A "Secrets and keys" set keeps .env files and private keys out of Git. Add your own patterns and download the file.
Already committed a file you now want ignored? Git keeps tracking it until you run git rm --cached <file>. Check why a file is ignored with git check-ignore -v <file>.
Common use cases
- Start a new repository with a sensible .gitignore
- Stop build folders, dependencies and OS files being committed
- Keep .env files and keys out of version control
How to use
- Tick the languages, tools, systems and editors you use.
- Add any project-specific patterns.
- Copy or download the .gitignore file and put it in the root of your repository.
FAQ
Why is a file still tracked after I added it?
.gitignore only affects untracked files. Run git rm --cached <file> to stop tracking it, then commit.
Should .env files be ignored?
Yes. They usually hold secrets. Commit an example file (.env.example) without real values instead.
Related tools
- JS FormatterFormat and beautify JavaScript code with proper indentation.
- CSS FormatterFormat and beautify CSS code with proper indentation.
- OpenAPI ValidatorValidate OpenAPI/Swagger specification documents.
- Swagger JSON to YAMLConvert Swagger/OpenAPI JSON to YAML format.
- YAML to Swagger JSONConvert Swagger/OpenAPI YAML to JSON format.
- Markdown PreviewPreview Markdown content rendered as HTML in real-time.
- Git Command CheatsheetIn Reference