A 5-stage process for contributing new or updated
.gitignoretemplates. Each stage has a goal, actions, and exit criteria.
We operate on three principles:
- Be precise. Templates that accidentally ignore important files cause real damage. Test your work.
- Be minimal. Every pattern increases maintenance surface area. If a pattern isn't clearly justified, leave it out.
- Be consistent. The collection's value is in its uniformity. When all templates follow the same structure, users can trust them without reading each one.
STAGE 1 STAGE 2 STAGE 3 STAGE 4 STAGE 5
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ FIND │───▶│ PLAN │───▶│ WRITE │───▶│ VERIFY │───▶│ SHIP │
│ │ │ │ │ │ │ │ │ │
│Find what │ │Design the│ │Build the │ │Prove it │ │Submit │
│to work on│ │template │ │template │ │works │ │the PR │
└──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
Goal: Identify the right thing to work on.
| Source | Best for |
|---|---|
Issue tracker — issues labeled help-wanted or new-template |
New contributors |
| Missing technology — popular tool/framework without a template | Experienced users |
| Template bugs — wrong or missing pattern in an existing template | Experienced users |
| Version updates — new artifacts from a technology update | Domain experts |
- Search existing templates — does it already exist?
- Search open issues — is someone else working on it?
- Search closed issues/PRs — was it rejected before? Why?
- Check the official source — what does the project's own
.gitignorelook like?
If everything checks out, open an issue describing what you plan to do.
Goal: Design before writing.
New or modifying?
├── NEW TEMPLATE → Which category?
│ ├── Language? → languages/ (modular, no security)
│ ├── Framework? → frameworks/ (self-contained, security-first)
│ ├── Tool/CI? → tools/
│ ├── IDE/Editor? → ides/
│ ├── OS? → os/
│ └── Platform? → platforms/
│
└── MODIFYING → What type?
├── Add patterns → Determine correct section
├── Remove patterns → Verify against official sources
├── Reorganize → Follow TEMPLATE_STANDARDS.md section ordering
└── Fix metadata → Follow TEMPLATE_STANDARDS.md formatting
- Prefer official sources. Check the technology's own
.gitignorefirst. Community patterns come second. - Eliminate, don't accumulate. Each pattern must justify its existence.
- Respect the boundary. Framework templates are self-contained. Language templates are modular. Never mix the two.
- Test assumptions. A pattern that "should" work may not. Always test.
| In scope | Out of scope |
|---|---|
| Technology-specific artifacts | Generic catch-all patterns |
| Build outputs that regenerate | Pattern explanations beyond one comment |
| Dependency directories | Configuration instructions |
| Cache and temp files | Team workflow documentation |
| IDE/editor artifacts | Shell aliases or scripts |
| Security-sensitive files | Personal preferences |
Goal: Build the template following TEMPLATE_STANDARDS.md.
- File named correctly (lowercase, hyphens, no dots) — see TEMPLATE_STANDARDS.md §Naming
- File in correct directory
- Header with
Created by https://gitignores.com/— see TEMPLATE_STANDARDS.md §Zone 1 - Metadata block with all 7 fields — see TEMPLATE_STANDARDS.md §Zone 2
- Sections in prescribed order with
# •••••dividers — see TEMPLATE_STANDARDS.md §Zone 3 - Footer with
TEMPLATE CUSTOMIZATION & BEST PRACTICES— see TEMPLATE_STANDARDS.md §Zone 4 - Combination recipes — see TEMPLATE_STANDARDS.md §Zone 5
| Type | Directory | Security Section | Notes |
|---|---|---|---|
| Framework | frameworks/ |
REQUIRED (first) | Full template; combine with IDEs/OS only |
| Language | languages/ |
FORBIDDEN | Must pair with common/security.gitignore |
| Tool | tools/ |
None | Combine with language or framework |
| IDE | ides/ |
None | Combine with anything |
| OS | os/ |
None | Combine with anything; include all 3 for cross-platform |
| Platform | platforms/ |
None | Platform-specific development |
| Common | common/ |
security.gitignore has it |
Designed for combination |
Goal: Prove the template works.
Run the smoke test from TEMPLATE_STANDARDS.md §Verification, adapting the touch files to your template's patterns:
mkdir -p /tmp/gt-$$ && cd /tmp/gt-$$ && git init
cp /path/to/template.gitignore .gitignore
touch .env .env.local credentials.json secret.key # adapt to your template
git status --ignoredPick 3–5 patterns from your template and verify each:
git check-ignore -v node_modules/test.js # Should show matching pattern
git check-ignore -v src/main.js # Should produce no outputsort template.gitignore | uniq -d # Must produce no outputVerify all items in TEMPLATE_STANDARDS.md §Quality Gates:
- Syntax:
git check-ignore -vreturns no errors - Dedup:
sort | uniq -dproduces empty output - Alpha sort: each section's patterns in A–Z order
- Section order: matches prescribed template type order
- Zone completeness: all 4 required zones present
- Metadata accuracy: type, philosophy, and security fields match content
- Live test:
git status --ignoredworks as expected - Cross-check: consistent with sibling templates
Goal: Submit the contribution.
git checkout -b add-rust-template # Descriptive branch name
git add frameworks/rust.gitignore
git commit -m "add rust framework template
- Security patterns for .env, credentials, certificates
- Build artifacts: target/, *.rlib, *.so
- Dependency cache: .cargo/"
git push origin add-rust-template## Summary
[One sentence]
## Changes
- [Change 1]
- [Change 2]
## Design decisions
- Template type: [framework/language/tool/etc.] — why?
- Key patterns: [brief justification]
## Verification
- [ ] Tested with `git check-ignore`
- [ ] Tested with a real project
- [ ] No duplicate patterns
- [ ] Patterns alpha-sorted per section
## References
- Official .gitignore: [URL]
- Related issue: #[number]| Reason | Prevention |
|---|---|
| Duplicate of existing template | Search thoroughly in Stage 1 |
| Wrong template type | Review decision tree in Stage 2 |
| Missing security section (framework) | Framework templates MUST have security first |
| Has security section (language) | Language templates MUST NOT have security |
| Patterns not alpha-sorted | Sort each section before Stage 4 |
| No testing evidence | Run verification procedure in Stage 4 |
| Violates TEMPLATE_STANDARDS.md | Read it before Stage 3 |
For a catalog of known template mistakes and how to avoid them, see TEMPLATE_STANDARDS.md §Common Mistakes.
- Template standards:
TEMPLATE_STANDARDS.md— definitive design system - Repository operations:
AGENTS.md— operations manual - Issues: GitHub Issues
- Online tool: gitignores.com