This guideline details necessary files and overall structure for your repository.
Important
This guidelines also details the GitHub specific files and folders that can be included in your repository.
Examples for key files are located in the root of this repository and within the .github/
folder.
Utilize these files as templates to craft your GitHub special/specific files.
- README File
- LICENSE File
- .github/CREDITS File
- .github/CHANGELOG.md File
- .github/CONTRIBUTING.md File
- .github/CODE_OF_CONDUCT.md File
- .github/SECURITY.md File
- .github/SUPPORT.md File
- .github/CODEOWNERS File
- .github/ISSUE_TEMPLATE.md
- .github/PULL_REQUEST_TEMPLATE.md File
- FUNDING.yml File
- CITATION.cff File
- Other GitHub Special Files
- .gitignore File
- .gitattributes File
- .editorconfig File
- .prettierrc File
- .eslintrc File
- .stylelintrc File
- .huskyrc File
- .github Folder
- .github/workflows Folder
- .github/dependabot.yml File
- api Folder
- Misc. Folders
- Images, Gifs, Videos, and Documents
- Resources
Note
REQUIRED file for ALL tiers.
- A
README
file describes your project and provides information on how to use it. - The
README
file should be namedREADME.md
. - The
README
file should be located in the root of your repository. - Use the templates in the Template Guide as a starting point for your profile
README
(especially if you're using PRG).
Tip
Consult the README Guidelines for more resources and information on how to write a README
file.
Note
REQUIRED file for ALL tiers.
- This file contains the license for your project.
Resources:
Adding a License to a Repository Choose a License Open Source Licenses
Note
OPTIONAL file for ALL tiers.
- This file should contain a list of people who have contributed to your project.
- Compare this file to
AUTHORS
,CONTRIBUTORS
, andACKNOWLEDGMENTS
files below.
Resources:
Note
OPTIONAL file for ALL tiers.
- This file contains a list of changes for each version of your project.
- Follow Semantic Versioning guidelines.
- Given a version number MAJOR.MINOR.PATCH (e.g. 1.0.0), increment the:
- MAJOR version when you make incompatible API changes
- MINOR version when you add functionality in a backward compatible manner
- PATCH version when you make backward compatible bug fixes
- Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
- For pre-release and build metadata, use the labels alpha, beta, rc, and build using the format MAJOR.MINOR.PATCH-label.build.
- Examples:
- 1.0.0-alpha.1
- 1.0.0-beta.2
- 1.0.0-rc.1
- rc stands for release candidate, which is a beta version with potential to be a final product, which is ready to release unless significant bugs emerge.
- alpha and beta are used for pre-release versions
- build is used to identify a build
- This scheme is not strictly enforced, but it is recommended by the Semantic Versioning (SemVer) specification, highlighted in their 2.0.0 release here.
- Given a version number MAJOR.MINOR.PATCH (e.g. 1.0.0), increment the:
- Use the Keep a Changelog format for your changelog
Resources:
Semantic Versioning Semantic Versioning HOWTO Software Versioning What do the numbers in a version typically represent How do version numbers work? Keep a Changelog
Note
OPTIONAL file for ALL tiers.
- This file contains information on how to contribute to your project.
- See the Contributing-Gen Template to generate a contributing file for your project.
Resources:
Setting Guidelines for Repository Contributors Awesome Contributing List Hall-Of-Fame README Widget Contributing-Gen Template How to Build a CONTRIBUTING.md - Best Practices Good-CONTRIBUTING.md-template.md
Note
OPTIONAL file for ALL tiers.
- This file contains a code of conduct for your project.
- See the Contributing-Gen Template to generate a code of conduct for your project.
Resources:
Adding a Code of Conduct to your project Awesome Code of Conduct List Debian Code of Conduct
Contributing-Gen Template
CODE_OF_CONDUCT Example Contributor Covenant
Note
OPTIONAL file for ALL tiers.
- This file contains information on the security policy for your project.
Resources:
Note
OPTIONAL file for ALL tiers.
- This file contains information on how to get support for your project.
Resources:
Note
OPTIONAL file for ALL tiers.
- This file contains information on who owns the code for your project.
Resources:
Note
OPTIONAL file for ALL tiers.
- This file contains information on how to create a pull request for your project.
- This can also be a folder/directory called
ISSUE_TEMPLATE
with multiple templates for different types of pull requests.- e.g.
ISSUE_TEMPLATE/bug_report.md
,ISSUE_TEMPLATE/feature_request.md
,ISSUE_TEMPLATE/custom.md
- e.g.
Resources:
Creating a issue template for your repository About issue and pull request templates Multiple issue and pull request templates (Blog Post) Awesome Template Lists Creating an issue Manually creating a single issue template for your repository
Note
OPTIONAL file for ALL tiers.
- This file contains information on how to create a pull request for your project.
- This can also be a folder/directory called
PULL_REQUEST_TEMPLATE
with multiple templates for different types of pull requests.
Resources:
Creating a pull request template for your repository About issue and pull request templates Awesome Template Lists About automation for issues and pull requests with query parameters Manually creating a single issue template for your repository
Note
OPTIONAL file for ALL tiers.
- This file contains information on how to fund your project.
Resources:
Note
OPTIONAL file for ALL tiers.
- This file contains information on how to cite your project.
Resources:
Note
OPTIONAL files for ALL tiers.
Below are some other popular files used in GitHub repositories:
AUTHORS
file in your repository for more detailed information on the authors for your project.CONTRIBUTORS
a file in your repository for more detailed information on the contributors for your project.ACKNOWLEDGMENTS
file in your repository for more detailed information on the acknowledgments for your project.ROADMAP
file in your repository for more detailed information on the roadmap for your project.GOVERNANCE
file in your repository for more detailed information on the governance for your project.
Resources:
GitHub Special Files and Paths Common special files found in the root directory of a repository
Note
REQUIRED file for ALL tiers.
- This file should contain a list of files and folders that should be ignored by Git.
- Its recommended to ignore your vscode workspace files, virtual environment files, and any sensitive information files.
- e.g.
.vscode/
,venv/
,.env
- e.g.
Note
OPTIONAL file for ALL tiers.
- One reason I use this file, is to adjust the linguist language statistics on GitHub.
Resources:
Linguist -
Note
OPTIONAL file for ALL tiers.
- This file contains information on how to configure your editor.
Resources:
Note
OPTIONAL file for ALL tiers.
- This file contains information on how to configure your code formatting.
Resources:
Note
OPTIONAL file for ALL tiers.
- This file contains information on how to configure your code linting.
Resources:
Note
OPTIONAL file for ALL tiers.
- This file contains information on how to configure your style linting.
Resources:
Note
OPTIONAL file for ALL tiers.
- This file contains information on how to configure your git hooks.
Resources:
Note
OPTIONAL folder for ALL tiers.
- This folder contains information on how to configure your GitHub repository.
Resources:
Note
OPTIONAL folder for ALL tiers.
- This folder contains information on how to configure your GitHub Actions.
Resources:
Note
OPTIONAL file for ALL tiers.
- This file contains information on how to configure your GitHub Dependabot.
Resources:
Note
OPTIONAL folder for ALL tiers.
- This folder contains information on how to configure your API.
- Include any API documentation in this folder.
- Include any postman collections in this folder.
Note
OPTIONAL folders for ALL tiers.
- Add any other folders as needed.
- A lot of projects, especially web frameworks, have a
src/
folder and other related folders.
Important
It's important to follow your frameworks conventions and programming style guides.
Note
OPTIONAL files for ALL tiers.
- Include repo images and GIFs in a
docs/images
folder. - Include repo videos in a
docs/videos
folder. - Add important documents to the
docs
folder. - Add more folders as needed.
Resources:
GiFox - Paid GIF recording tool for macOS. Snagit - Paid screen capture tool for macOS and Windows.
- GitHub Repository Structure Best Practices - A list of GitHub repository structure best practices.
- Best practices for repositories - Learn how to use repositories most effectively.
- Best Practices for GitHub Repositories - A list of best practices for GitHub repositories.
- Linguist - This library is used on GitHub.com to detect blob languages, ignore binary or vendored files, suppress generated files in diffs, and generate language breakdown graphs.
- Creating discussion category forms - You can customize the templates that are available for community members to use when they open new discussions in your repository.
- Viewing traffic to a repository - Anyone with push access to a repository can view its traffic, including full clones (not fetches), visitors from the past 14 days, referring sites, and popular content in the traffic graph.
- JavaScript Standard Style) - JavaScript Style Guide, with linter & automatic code fixer.
- Common README for node modules - A common README style for node modules.
- Project Guidelines - A set of best practices for JavaScript projects.
- What are all available Git special files that can be committed to a repository? - Stack Overflow question on GitHub special files.
- Creating a default community health file - You can create default community health files, such as CONTRIBUTING and CODE_OF_CONDUCT. Default files will be used for any repository owned by the account that does not contain its own file of that type.