github /gitignore

A collection of useful .gitignore templates

★ 176,304⑂ 82,018👁 3,363⑃ 4,811● 0▤ 0◈ 9
CC0-1.0Created 2010-11-08
176,304
stars
+92
82,018
forks
3,363
watchers
4,811
prs
0
issues
0
releases
9
discussions

README

A collection of .gitignore templates

This is GitHub’s collection of [.gitignore][man] file templates.
We use this list to populate the .gitignore template choosers available
in the GitHub.com interface when creating new repositories and files.

For more information about how .gitignore files work, and how to use them,
the following resources are a great place to start:

- The [Ignoring Files chapter][chapter] of the [Pro Git][progit] book.
- The [Ignoring Files article][help] on the GitHub Help site.
- The [gitignore(5)][man] manual page.

[man]: https://git-scm.com/docs/gitignore
[help]: https://docs.github.com/en/get-started/git-basics/ignoring-files
[chapter]: https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository_ignoring
[progit]: https://git-scm.com/book

 Folder structure

We support a collection of templates, organized in this way:

- The root folder contains templates in common use, to help people get started
  with popular programming languages and technologies. These define a meaningful
  set of rules to help get started, and ensure you are not committing
  unimportant files into your repository.
- Global contains templates for various editors, tools and
  operating systems that can be used in different situations. It is recommended
  that you either add these to your global template
  or merge these rules into your project-specific templates if you want to use
  them permanently.
- community contains specialized templates for other popular
  languages, tools, and projects that don't currently belong in the mainstream
  templates. These should be added to your project-specific templates when you
  decide to adopt the framework or tool.

 What makes a good template?

First and foremost, a template contribution must adhere to our
Contributing Guidelines.

A template should contain a set of rules to help Git repositories work with a
specific programming language, framework, tool or environment.

If it's not possible to curate a small set of useful rules for this situation,
then the template is not a good fit for this collection.

If a template is mostly a list of files installed by a particular version of
some software (e.g. a PHP framework), it could live under the community
directory. See versioned templates for more details.

If you have a small set of rules, or want to support a technology that is not
widely in use, and still believe this will be helpful to others, please read the
section about specialized templates for more details.

Include details when opening a pull request if the template is important and visible. We
may not accept it immediately, but we can promote it to the root at a later date
based on interest.

Please also understand that we can’t list every tool that ever existed.
Our aim is to curate a collection of the _most common and helpful_ templates,
not to make sure we cover every project possible. If we choose not to
include your language, tool, or project, it’s not because it’s not awesome.

Discussions

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON