Skip to content

Instantly share code, notes, and snippets.

@xairoo
Created January 10, 2025 18:16
Show Gist options
  • Save xairoo/50a3e1a58e6395425e9c193aae065e3d to your computer and use it in GitHub Desktop.
Save xairoo/50a3e1a58e6395425e9c193aae065e3d to your computer and use it in GitHub Desktop.
Standardized Commit Messages With Conventional Commits

Standardized Commit Messages With Conventional Commits

The Conventional Commits specification is often used to standardize commit messages. The most common types are:

  • feat: New features or functionalities.
    Example: feat: add user authentication module

  • fix: Bug fixes.
    Example: fix: correct login validation error

  • chore: Changes that are neither features nor bug fixes (e.g., refactoring, tooling, build adjustments).
    Example: chore: update dependencies

  • docs: Documentation changes.
    Example: docs: add API usage example

  • style: Code formatting changes without affecting logic (e.g., linting, whitespace).
    Example: style: fix indentation

  • refactor: Code changes that neither add a feature nor fix a bug (e.g., code improvements).
    Example: refactor: improve data processing logic

  • test: Adding or modifying tests.
    Example: test: add unit tests for login

  • perf: Performance improvements.
    Example: perf: optimize image loading

Breaking Changes

Use ! to mark a breaking change:

  • feat!: New features or functionalities.
    Example: feat!: add user authentication module

Define Component

Add the component:

  • feat(componentName): New features or functionalities for specific component.
    Example: feat(componentName): add user authentication module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment