.gitignore generator

This tool combines common operating-system, editor, language, and framework rules offline, preserves rule order and last-match semantics, and generates an editable .gitignore.

Local browser processing
This page has passed the public directory check; full functionality is available after enabling JavaScript.
User Guide

How to use the .gitignore generator

The selected templates and custom rules are combined only on the current page; the project directory is not read, and nothing is uploaded.

  1. Search and select a template

    Choose rules from operating system, editor, language, and framework templates that match the project’s actual environment.

  2. Add custom rules

    Add project-specific rules as needed, up to 100 KiB; the tool places custom content after the built-in template and preserves the rule order as-is.

  3. Review and save

    After checking that the generated result will not ignore necessary source code or configuration, copy the content or download the .gitignore.

Limitations and Notes

  • The built-in templates are an original set of rules fixed by version and do not sync the latest templates from other sites online.
  • The tool does not scan or infer your project structure, and it cannot determine whether a cache, build artifact, or key file should be ignored.
  • .gitignore will not stop tracking files that have already been committed; once sensitive information enters history, it still needs to be cleaned up and rotated separately.

FAQ

Can multiple languages or frameworks be selected at the same time?

Yes. The template will be combined in the built-in order, custom rules will keep their full order and be placed at the end, to match the last-match-wins semantics of Git.

Why is the file still in Git after generation?

Files already tracked by Git are not affected by new ignore rules; confirm the risks before removing them from the index.

Is the template the same as the official GitHub template?

No. This site maintains an independent simplified template; review it against the project documentation and build process before use.

Page feedbackFound an issue or have suggestions for improvement?
Feedback features need to be used in the online version

Please enable JavaScript in the online version before submitting; local features of the current tool or example are not affected.

Go to the online version for feedback