Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

Committing guidelines

Marc Ranolfi edited this page Nov 16, 2019 · 10 revisions

Commit messages are a gold opportunity to give people context on what you are adding to the codebase. These are some guidelines to make sure everyone is using them consistently.

Subject line format

Your subject line (the commit title) should be a concise summary of the changes being submitted. Be specific and precise, and avoid getting into minuteness - additional context, if needed, should be added in the detailed commit description, not here.

Please keep the subject line under 70-75 characters. This encourages conciseness and ensures the summary is rendered fully in a diverse range of environments.

Good:

Add the user's fetch information in a global multidimensional array instead of a local one.

Bad:

Fixed scope bugs.

Commit description format

In most cases - except for the most trivial changes, a commit description (or "body") is necessary in order to include additional context (such as how and why a certain change - or set thereof - was implemented). Be descriptive and provide as much information as required, while also striving to minimize excessive verbosity.

Commit descriptions can have any arbitrary number of lines, within reason - use your best judgement. Does your description refer only to things that are actually relevant to the changes being made?

Also note that, unlike the commit summary, there is no restriction imposed on the commit description character length. Here as well, we expect contributors to use their best judgement, by using line breaks and blank lines where it makes sense.

  1. Use standard markdown, don't mix styles. Check a markdown cheatsheet before committing if you're not sure.
  2. Include relevant information and context where you can, to allow us to quickly see the purpose of the commit. Don't be too verbose - be specific and concise.
  3. Write in the infinitive, not in the past - i.e. write "Add user details to global scope and fetch on load" rather than "Added user details to global scope and fetched on load"

If your change is small enough to not have a commit body, i.e. your subject line can describe your changes, then it's okay to commit without one. If you're making significant changes that require more explanation then you must include the commit body.

Clone this wiki locally