Skip to content

Instantly share code, notes, and snippets.

@CesarDenis
Last active June 13, 2019 14:36
Show Gist options
  • Save CesarDenis/9611be62fb32fb85626bdba9ffe6a46e to your computer and use it in GitHub Desktop.
Save CesarDenis/9611be62fb32fb85626bdba9ffe6a46e to your computer and use it in GitHub Desktop.
Commit Message Guidelines

Commit Message Guidelines

Commit Message Format

Each commit message consists of a header and a body. The header has a special format that includes a type and a subject:

<type>: <subject>
<BLANK LINE>
<body>

The header is mandatory.

Any line of the commit message cannot be longer 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.

Revert

If the commit reverts a previous commit, it should begin with revert: , followed by the header of the reverted commit. In the body it should say: This reverts commit <hash>., where the hash is the SHA of the commit being reverted.

Type

Must be one of the following:

  • build: Changes that affect the build system or external dependencies
  • content: Changes in content of static files (.json data, images, etc)
  • ci: Changes to our CI configuration files and scripts
  • docs: Documentation only changes
  • feature: A new feature
  • fix: A bug fix
  • performance: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • test: Adding missing tests or correcting existing tests

Subject

The subject contains succinct description of the change:

  • use the imperative, present tense: "change" not "changed" nor "changes"
  • don't capitalize first letter
  • no dot (.) at the end

Body

The body should is the place to reference GitHub issues that this commit Closes.

@eduardoguilarducci
Copy link

We need to insert a new type: content

content: for changes in content of static files like .json data or images like logo, photos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment