Skip to content

Latest commit

History

History
71 lines (51 loc) 路 2.36 KB

File metadata and controls

71 lines (51 loc) 路 2.36 KB

Commit Message Naming Convention

To maintain consistency and clarity in the project, the following commit message naming convention should be followed for all commits in the project consisting of web, libraries, and apps.

General Format

<type>(<scope>): <message>

Where:

  • <type>: The type of change (describes what was done).
  • <scope>: (Optional) The part of the application affected by the change (e.g., frontend, backend, library).
  • <message>: A short description of the change.

Commit Types

Use the following standard types to describe the purpose of the commit:

  • feat: Adding new functionality.
  • fix: Fixing a bug.
  • docs: Documentation updates.
  • style: Changes that do not affect functionality (e.g., code formatting, indentation).
  • refactor: Code refactoring that does not fix a bug or add a feature.
  • test: Adding or modifying tests.
  • chore: General tasks such as updating dependencies, build settings, etc.
  • ci: Changes to CI/CD configuration.
  • build: Changes related to the build system or dependencies.
  • perf: Improving performance.
  • wip: Work in progress (commit to save progress).

Examples

Frontend

  • feat(frontend): add new button component
  • fix(frontend): fix issue with button click
  • style(frontend): align text in the button
  • refactor(frontend): refactor file structure
  • docs(frontend): update documentation for components

Backend

  • feat(backend): add new authentication endpoint
  • fix(backend): fix token validation issue
  • perf(backend): optimize database queries
  • chore(backend): update backend dependencies
  • test(backend): add tests for new endpoint

Libraries

  • feat(library): add utility for string manipulation
  • fix(library): fix bug in JSON parser
  • chore(library): update library documentation

Message Length Limitations

  • The main message should be no longer than 72 characters to improve readability in git logs and outputs.

Use of Present Tense

  • Commit messages should be written in the present tense. For example, use:
    • Add new functionality
    • Not Added new functionality

Complete Commit Examples

feat(frontend): add registration form component fix(backend):
fix issue with saving data to the database
refactor(library): refactor report generation function
docs(frontend): update documentation for form components