Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit Message Style Guide

Rafael Belchior edited this page Sep 13, 2018 · 8 revisions

Commit Message Structure

A commit message should consist of two distinct parts separated by a blank line: the title and an optional body. The layout looks like this:

type: subject

body

Title

The title should consist of the type of the change and subject separated by a colon :. The title should be clear, precise, and simple.

Type

The type is contained within the title and can be one of these types:

  • feat: developing a feature

  • fix: a bug fix

  • docs: changes to documentation

  • style: formatting, missing semicolons, etc; no code change

  • refactor: refactoring production code

  • test: adding tests, refactoring test; no production code change

  • other: updating dependencies, updating build tasks, package manager configs, etc; no production code change and others that don't belong to any category

Subject

Should begin with a capital letter and should not end with a period.

Use an imperative tone to describe what a commit does, rather than what it did. For example, use change; not changed or changes.

Body

If the changes made in a commit are complex, they should be explained in the commit body. Use the body to explain the what and why of a commit, not the how.

When writing a body, the blank line between the title and the body is required and you should limit the length of each line to no more than 72 characters.

Examples

Without body

docs: adds README or

With body

fix: fixed long loading time on the main page

Used ng build --prod --aot=false, in order to build the front-end in production mode.
This will resolve issue #140```