Git README best practices
In every Git repository, the first file that one should read is the README file. Therefore is should provide concise and up-to-the point information on the contents of the repository. It could be considered as a manual for the repository.
Who is the audience?
- developer: code contribution, integration
- end user: usage of the tool
- project manager: technology stack, integration to other modules
What is the format of a Git README file?
What is the purpose of a Git README file?
The purpose of the file is to give information about the following topics:
- Description (What the project is trying to solve?)
- Features (What are the main functionality of the project?)
- Prerequisites (What are the requirements of the project to operate?)
- Installation (How can it be installed?)
- Verification (How the installation could be tested?)
- Usage (How can it be used?)
- Related projects (What are the projects which has close relationship with this one?)
- Documentation (Where additional information could be found?)
- Licence (What kind of licence the project has?)
In the next section, the topics above are discussed.
Description
If the project is a fork of a standard library, include the following:
- Version:
- tag: git tag used for the fork
- commit: short commit id where the fork happened
- Upgade: description whether it is possible to upgrade to a newer version, or we are stuck for to the current version for any specific reason.
- Changes:
- functional description and motivation of changes
Features
Prerequisites
Operating system
Framework & technologies infrastructure
Knowledge
Installation
It is crucial to provide step-by-step specification on the installation of a project. Installation instructions start after the user has the required environment (e.g. Prerequisites above), and ends right before calling the project either from the command line or from a web browser.
Verification
Usage
Providing a examples how to use our project is also necessary.
Related projects
Documentation
It is recommended to provide detailed description of all the switches of the program, all the keys to unlock its potential. It is important to provide a simple README file while linking to a dedicated documentation website, with per-version documentation, as well as dedicated documentation on variants of the library.
The documentation could contain information about:
- Developer guides
- API documentation (e.g. Swagger API documentation)
- Configuration guides
- Changelog (e.g. CHANGES file. A widespread format is the GNU Coding standards changelog.)
- Migration guides (e.g. from version 1 to version 2)