Skip to content

Prefix

Certainly! Here's a brief explanation of the GitHub commit prefixes you're using:

  1. feat:
    Indicates a new feature added to the codebase. Use this for significant changes that introduce new functionality.
  2. Example: feat: add user login feature

  3. fix:
    Used when fixing a bug. This is for any code changes that address a problem or bug in the code.

  4. Example: fix: correct login validation error

  5. chore:
    Refers to routine tasks or changes that don't modify application functionality. This could include maintenance tasks, dependency updates, or refactoring code that doesn’t affect the app’s behavior.

  6. Example: chore: update dependencies

  7. docs:
    Used for documentation changes. This includes updating or adding documentation, such as README files, comments, or inline documentation.

  8. Example: docs: update API usage in README

Additional Common Prefixes:

  1. style:
    Used for changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.).
  2. Example: style: format code with Prettier

  3. refactor:
    A code change that neither fixes a bug nor adds a feature, but improves code structure or readability.

  4. Example: refactor: simplify login logic

  5. test:
    For adding or updating tests. This is useful when writing new tests or modifying existing ones.

  6. Example: test: add unit tests for login feature

  7. perf:
    Indicates a code change that improves performance. Use this for optimizations that enhance the efficiency of the application.

  8. Example: perf: improve login speed by optimizing query

  9. ci:
    Used for Continuous Integration changes, like updating configuration files for build systems or adding CI/CD pipelines.

  10. Example: ci: configure Travis CI for testing

  11. build:
    Refers to changes that affect the build system or external dependencies (e.g., gulp, npm).

    • Example: build: update webpack configuration

These prefixes follow the Conventional Commits specification and help in maintaining a clean and structured commit history.