A good README for a GitHub project tells a new visitor within seconds what the project does, how to install it, how to run it and how to get help. GitHub shows the README on the repository home page, so it is the first thing people read. These github readme best practices keep it short, scannable and useful for users and contributors alike.
This guide shows a structure you can copy, what to include in each part, and the small details, such as badges and relative links, that make a README easier to trust.
People decide in under a minute whether a repository is worth their time. A clear README answers four questions: what is this, why should I care, how do I use it, and where do I go if something breaks. A project with excellent code and no README is usually skipped.
GitHub looks for a file named README.md (also README, README.rst and others) in the root of the repository, in a docs folder, or in a special .github folder, and renders it as Markdown on the front page. Markdown is the usual choice because it is simple and supported everywhere.
Here is a template for a small project. Replace the names and keep what applies:
The template is only an example; replace the badge address with your real build badge or remove the line.
Use the project name as the only top-level heading, and follow it with one sentence that says what the project does for whom. Avoid vague words such as "powerful" or "next-generation". Say "A command line tool that converts CSV files to JSON" instead.
This is the part most readers came for. Show the exact commands in code blocks, in the order a beginner would run them, and state the requirements, for example "Requires Python 3.11 or newer". Test the steps on a clean machine now and then, because installation instructions go stale faster than anything else.
Follow with the smallest working example and its expected output. A screenshot or short animation helps for graphical tools; keep the file small and add alternative text for accessibility.
List options in a table when there are several, and say honestly what the project does not do. Honest limits save everyone time and build trust.
Say how to report a bug, where to ask questions, and how to run the tests. Link to a longer CONTRIBUTING.md instead of putting everything in the README. Always state the license, because without one the code is legally not free to reuse. GitHub can add a standard license file for you from the repository's Add file menu.
## then ###) so the automatic outline in the README file header works.docs/setup.md for files inside the repository, so links keep working in forks and branches.docs folder or a documentation site and link to them.Usually yes. GitHub renders Markdown well, and almost every developer knows it. Other formats such as reStructuredText also render, but Markdown is the safe default.
Put README.md in the repository root. GitHub also finds it in .github or docs, but the root is the most visible and works with other tools.
Long enough to get a new user to a working result, and no longer. Move detailed material into separate documents and link to it.
Yes. A public repository named exactly like your username, containing a README.md, is shown on your GitHub profile page.
A good README names the project, explains it in one sentence, shows install and usage steps with tested commands, and ends with contributing and license information. Keep it scannable, use relative links and code tags, and update it whenever the project changes.