Conventional Commits Readme

Conventional Commits is a spec for adding readable meanings to commit messages.

gitgithub

Conventional Commits is a specification for adding human and machine readable meaning to commit messages.

See more explanation about Conventional Commits.

Commit Message Convention

A commit message convention is a set of guidelines or rules that developers follow when creating commit messages for their code changes. The goal is to make the commit history more readable, understandable, and consistent. A well-defined commit message convention helps team members and collaborators to quickly grasp the purpose and context of each commit.

Format

[type](optional scope): [description]

Example

feat(pre-event): add speakers section

Types

Available types are:

  • add → Adding new files, or adding new code in existing files
  • feat → Changes about addition or removal of a feature. Ex: feat: add table on landing page, feat: remove table from landing page
  • fix → Bug fixing, followed by the bug. Ex: fix: illustration overflows in mobile view
  • docs → Update documentation (README.md)
  • style → Updating style, and not changing any logic in the code (reorder imports, fix whitespace, remove comments)
  • chore → Installing new dependencies, or bumping deps
  • refactor → Changes in code, same output, but different approach
  • ci → Update github workflows, husky
  • revert → when reverting commits
  • perf → Fixing something regarding performance (deriving state, using memo, callback)
  • vercel → Blank commit to trigger vercel deployment. Ex: vercel: trigger deployment
  • deps → Updates/Changes to dependencies/configurations. Ex: deps: update axios to v0.21.1
  • hotfix → Fixing something in production

Optional Scope

Labels per page Ex: feat(pre-event): add date label

*If there is no scope needed, you don't need to write it

Description

Description must fully explain what is being done.

Add BREAKING CHANGE in the description if there is a significant change.

If there are multiple changes, then commit one by one

  • After colon, there are a single space Ex: feat: add something
  • When using fix type, state the issue Ex: fix: file size limiter not working
  • Use imperative, and present tense: "change" not "changed" or "changes"
  • Don't use capitals in front of the sentence
  • Don't add full stop (.) at the end of the sentence