Git Commit Conventions
This document outlines the commit message convention we adhere to in our development process. It's crucial that every developer follows this standard for consistency and better collaboration.
Format
Each commit message must have a **type** and a **description**. The format is as follows:
<type>: <description>
- `<type>`: Represents the category of the change being made.
- `<description>`: Briefly explains the change being made.
Type
The type is mandatory and should be one of the following:
- `feat`: A new feature.
- `fix`: A bug fix.
- `docs`: Documentation changes.
- `style`: Changes that do not affect the meaning of the code (like white-space, formatting, missing semi-colons, etc.)
- `refactor`: A code change that neither fixes a bug nor adds a feature.
- `perf`: A code change that improves performance.
- `test`: Adding missing or correcting existing tests.
- `chore`: Changes to the build process or auxiliary tools and libraries, such as generating documentation.
- `build`: Changes that affect the build system or external dependencies.
- `ci`: Changes to CI configuration files and scripts.
Description
The description is mandatory. It should be succinct and clear, conveying the purpose of the commit.
Example of type and description:
feat: implement two-factor authentication
Optional Fields
There are optional fields which can be added to provide more context, i.e., **scope**, **body**, and **footer**.
<type>(<scope>): <description>
<body>
<footer>
Scope
Scope could be anything specifying the place of the commit change.
Body
The body should include the motive for the change and contrast this with previous behavior.
Footer
The footer is often used to reference the issues fixed by the commit.
Example with optional fields:
feat(user-authentication): implement two-factor authentication
In this update, we've added two-factor authentication for user login. After entering their password, users are now prompted for a secondary code sent to their registered email. This addition significantly enhances account security.
Closes #123, #245, #992
By following this convention, we aim to have a clear and consistent commit history, making it easier for everyone to understand and navigate.
Last updated