Skip to content

Commit Message Structure

Naveen Sundar edited this page Apr 17, 2020 · 2 revisions

Commit Message Structure

Syntax for a commit message is:

type: message


Message:

  1. The message should say what the commit is for.
  2. Use an imperative tone to describe what a commit does, rather than what it did. For example: use change; not changed or changes.
  3. Message should be no longer than 50 characters.
  4. Should start with a capital letter

Type can be one of these:

  1. feat: a new feature
  2. fix: a bug fix
  3. docs: changes to documentation
  4. test: adding tests, refactoring test; no production code change
  5. refactor: refactoring production code, formatting, missing semi colons etc.,

Examples:

feat: Create django app users

fix: Error on wrong user id to api/users/

docs: Update screenshots in the documentation

test: Add tests/api/get_users.py

refactor: Simplify utils/send_email.py

Clone this wiki locally