This document explains how to contribute new templates or update existing templates in the GitHub gitignore repository. It covers contribution guidelines, template quality standards, folder placement criteria, versioning strategies, and the submission workflow.
For detailed information about template structure and best practices, see Template Standards and Guidelines. For understanding the repository organization, see Repository Structure and Organization.
The gitignore repository accepts contributions that provide value to the broader developer community. The contribution process ensures templates remain high-quality, well-documented, and appropriately categorized. This page documents the technical requirements, organizational decisions, and workflow mechanics for submitting changes.
Key Goals:
Sources: README.md19-35 README.md37-55 README.md71-82 README.md84-89
Technical Implementation:
The workflow follows GitHub's standard fork-and-pull-request model README.md114-129:
main branch README.md121Sources: README.md114-129 CONTRIBUTING.md28-29
| Requirement | Description | Rationale |
|---|---|---|
| Application Link | Provide homepage URL for language/framework/tool | Maintainers may not be familiar with the technology CONTRIBUTING.md7-9 |
| Documentation Links | Include canonical documentation for ignored files | Current documentation is preferred over historical CONTRIBUTING.md17-18 |
| Change Justification | Explain why the change applies to everyone | Distinguish universal patterns from team-specific preferences CONTRIBUTING.md11-15 |
| Scope Consideration | Ensure changes target correct template | OS-specific rules like .DS_Store belong only in Global/macOS.gitignore CONTRIBUTING.md22-26 |
| Single Template Rule | Modify only one template per pull request | Keeps feedback focused and reviews manageable CONTRIBUTING.md28-29 |
| No Duplicates | Do not create duplicate sections or rules | Avoids confusion and maintenance risk CONTRIBUTING.md31-36 |
Example Documentation in Template Header:
Sources: CONTRIBUTING.md7-36 community/Alteryx.gitignore1-3
Anti-patterns to Avoid:
community/ README.md48-50 CONTRIBUTING.md41-43Sources: README.md37-64 CONTRIBUTING.md41-50
Version Management Rules README.md69-82:
community/.# It is recommended that you use Magento.gitignore as this is the latest version community/PHP/Magento1.gitignore3Sources: README.md69-82 community/PHP/Magento1.gitignore1-4
Specialized templates that are not mainstream belong in the community/ directory under an appropriate subfolder README.md84-89
community/
├── PHP/
│ ├── Magento1.gitignore
│ └── TYPO3.gitignore
├── JavaScript/
│ └── Vue.gitignore
└── [Category]/
└── [Technology].gitignore
The rules in specialized templates should be specific to the framework or tool README.md90-91
Example Header README.md94-100:
Recommended Template References: Mention complementary templates in the header comments to guide users on combining rules (e.g., combining a framework template with a language or IDE template) README.md91-92
Sources: README.md84-100 community/JavaScript/Vue.gitignore1-4
The repository uses a stale bot (.github/workflows/stale.yml) to manage the high volume of PRs with a small maintenance team .github/workflows/stale.yml3-5
keep are exempt from stale processing .github/workflows/stale.yml29When opening a PR, you must complete the PULL_REQUEST_TEMPLATE.md:
Sources: .github/workflows/stale.yml1-33 .github/PULL_REQUEST_TEMPLATE.md1-33
The repository is licensed under CC0-1.0 README.md132 By contributing, you agree to release your work into the public domain under these terms.
Sources: README.md132
Refresh this wiki