Start a new project by copying the matching language template into your .gitignore file to automatically exclude build artifacts and dependencies.
Combine a language template with a Global template to exclude IDE-specific files like .vscode or .idea folders across all your projects.
Find specialized templates for less common tools and frameworks in the community folder when the root templates don't match your tech stack.
This repository is GitHub's official collection of useful .gitignore templates. A .gitignore file tells Git, the version control system most developers use, which files in a project should be left out of source control. Typical examples are build artifacts, logs, dependency folders, IDE config files, and operating-system files like macOS's .DS_Store: things you don't want cluttering up your repository or getting accidentally committed. It works by storing a set of curated template files, organized into three groups. The root folder contains common-use templates for popular programming languages and technologies, designed to give a sensible starting point. The Global folder contains templates for editors, tools, and operating systems that you can either add to your machine-wide global ignore configuration or merge into a project-specific template. The community folder contains specialized templates for other languages, tools, and projects that don't fit the mainstream set, and is also where versioned variants of mainstream templates live so older projects can still find a matching template. GitHub itself uses this list to populate the .gitignore template chooser shown when you create a new repository on github.com. You'd use this whenever you start a new project, copy the template that matches your language or framework into a .gitignore file at the root, optionally combine it with a Global template, and customize from there. The README also describes contribution rules: each template should contain rules specific to a language, framework, or tool, and the project explicitly does not aim to cover every tool ever made. The repo is essentially a curated set of plain-text .gitignore files, licensed under CC0-1.0, meaning you can use them freely without attribution.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.