Skip to content

Instantly share code, notes, and snippets.

@Benjaminsson
Forked from Zekfad/conventional-commits.md
Last active January 14, 2026 10:05
Show Gist options
  • Select an option

  • Save Benjaminsson/79529d5d867cb3e2e28139fb21b3a81f to your computer and use it in GitHub Desktop.

Select an option

Save Benjaminsson/79529d5d867cb3e2e28139fb21b3a81f to your computer and use it in GitHub Desktop.
Conventional Commits Cheatsheet

Conventional Commits Guidelines

This document outlines our commit message conventions. We follow Conventional Commits.


Quick Examples

feat: Add loan amount slider component
fix(validation): Correct phone number regex for Finland
feat!: Overhaul application state management
chore(deps): Update dependencies
docs: Update README with setup instructions

Commit Message Format

<type>(<optional scope>): <description>

<optional body>

<issue reference>

Rules

  1. Keep header within 72 characters (aim for 50 when possible)
  2. Word wrap body at 72 characters
  3. Use the imperative form for headers
    • ✅ "Add validation for email field"
    • ❌ "Added validation for email field"
    • ❌ "Adds validation for email field"
  4. Capitalize the first letter of the description
  5. Explain what and why in the body when needed
  6. End with issue reference (e.g., Jira ID) on its own line after an empty line

Example Commit Message

feat(form): Add co-applicant income validation

The validation now checks that co-applicant income is within acceptable
range before submission. This prevents invalid applications from being
sent to the backend and provides immediate user feedback.

AD-173

Commit Types

Type Description Version Bump
feat Add or remove a feature Minor
fix A bug fix Patch
docs Documentation only changes None
style Changes that do not affect the meaning of the code (formatting, etc.) None
refactor A code change that neither fixes a bug nor adds a feature None
perf A code change that improves performance None
test Adding missing tests or correcting existing tests None
build Changes that affect the build system or external dependencies None
ci Changes to CI configuration files and scripts None
chore Changes which don't change source code or tests (build process, tools, etc.) None
revert Revert a previous commit Varies

Breaking Changes

Indicate breaking changes with ! after the type/scope or by adding BREAKING CHANGE: in the commit body. This triggers a major version bump.

feat(api)!: Change response format for loan applications

BREAKING CHANGE: The API now returns amounts in cents instead of full
currency units. All consumers must update their parsing logic.

AD-456

Atomic Commits

  1. One clear purpose per commit – Each commit should do one thing. Formatting changes, refactors, and features should be separate commits.

  2. Clean up before review – While developing you may create messy commits. Clean them up before requesting review.

  3. Complete commit messages – Messages should explain what is done and why. Don't sneak in small unrelated changes.


Reminders

  • Always end with the Jira issue ID (e.g., AD-173)
  • Multiple related issues can be listed separated by spaces: AD-173 AD-174
  • More details at conventionalcommits.org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment