Tick the templates that match your project (languages and build tools like Node, Python, Java/Maven/Gradle, Go, Rust, C/C++, .NET, Ruby, PHP, Android, Swift/Xcode, Kotlin and Terraform; frameworks like Next.js, Hugo and Unity; editors like JetBrains, VS Code and Vim; and OS junk files from macOS, Windows and Linux) and the combined .gitignore is built with a section header for each.
Patterns that appear in more than one template are written only once, in the first section that uses them. Add project-specific paths in the extra box and they go into a final Custom section. Download the result as .gitignore or copy it.
Keep in mind that .gitignore only affects untracked files. If something is already committed, run git rm --cached <path> to stop tracking it. Editor and OS patterns are often better placed in a global ignore file (git config --global core.excludesFile ~/.gitignore_global) so they don’t clutter every repository. Patterns starting with ! re-include files, as with !.env.example. The file is generated locally.