.gitignore Generator
Prepare a .gitignore for build outputs, caches and editor files that should stay untracked. Combine pinned templates from GitHub’s gitignore repository and append project-specific rules. The tool does not modify a repository: review the output before adding it to the project’s .gitignore.
Key features
- Combine a primary and an optional second language template
- Choose macOS, Windows or Linux plus VS Code or JetBrains patterns
- Include the exact upstream commit URL in generated comments
- Preserve pattern order, repeated rules, negations and macOS control-character patterns
How to use
- Choose the primary technology and an optional second technology.
- Select the operating system and editor templates you need.
- Enter any custom patterns, one per line. They will appear last.
- Run, review and save the output as .gitignore; use git status to check what remains tracked.
Use cases
- Start a combined Node.js and Python ignore file
- Exclude editor caches and OS metadata shared by a team
- Append project-specific exceptions to an existing pattern set
Frequently asked questions
Where do the templates come from?
They are a pinned github/gitignore snapshot verified on 2026-09-21. The generated comments include exact upstream commit URLs. Running this tool does not fetch templates from a remote server.
Will this stop tracking files already committed to Git?
No. .gitignore applies to untracked files. Files already tracked require a separate reviewed Git operation. This tool never changes a repository or its index.
Are duplicate patterns automatically removed?
No. Pattern order and negations can affect matching, so duplicate rules across templates remain. Selecting the same technology twice includes its entire section only once.
Why is an exclamation-mark exception not working?
A pattern beginning with ! can undo an earlier exclusion, but an excluded parent directory may prevent a child file from being included again. Check Git’s pattern rules and test in the actual project.
Why does the macOS section contain an unusual line?
The Icon and HFS+ metadata patterns contain literal carriage-return characters. Turning those characters into line breaks would damage the pattern, so they remain intact. Ordinary CRLF line endings become LF.
Should every environment file and lockfile be ignored?
That depends on the project. Review comments and exceptions in each template. Do not blindly exclude required lockfiles or re-include files containing secrets.
Privacy
Templates and custom rules are combined in your current browser. The tool does not access repositories, upload files, write browser storage or send your patterns to a server. You choose whether to copy or save the result.
Comments & questions