Skip to content

Commit Message Conventions

Satheesh Kumar edited this page Oct 6, 2015 · 2 revisions

Git Commit Guidelines

Commit Message Format

Each commit message starts with a type, a scope, and a subject.

Below that, the commit message has a body.

  • type: what type of change this commit contains.
  • scope: what item of code this commit is changing.
  • subject: a short description of the changes.
  • body (optional): a more in-depth description of the changes
<type>(<scope>): <subject>

<body>

Examples:

feat(DatePicker): a calendar to select dates 
fix(WelcomeFlow): persist manual date selection
style(AdCopy): add more spacing
refactor(Pencil): use graphite instead of lead

Graphite is a much more available resource than lead, so we use it to lower the price.

Any line of the commit message should not be longer 100 characters. This allows the message to be easier to read on github as well as in various git tools.

Type

This describes the kind of change that this commit is providing.

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (styling, white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug or adds a feature
  • test: Adding missing tests
  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation

Scope

The scope could be anything specifying place of the commit change. For example 'DatePicker, ProgressTracker`, etc...

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

This is the summary of the commit. It contains detailed description about this commit including additional information about packages being added, if any.

These rules are adopted from the AngularJS commit conventions.

Clone this wiki locally