.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.

Languages
Frameworks
Tools
Operating systems
Editors

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

  1. Tick the languages, tools, systems and editors you use.
  2. Add any project-specific patterns.
  3. 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.