Professional Documents
Culture Documents
Git Semantic Commit
Git Semantic Commit
Git Semantic Commit
Here are some examples of Git semantic commit messages following the conventional commit message
format:
Feature:
- This commit introduces a new feature for users to register on the platform.
- Closes issue #123.
Fix:
- This commit fixes a bug where the login form validation was not working correctly.
- Addresses issue #456.
Docs:
- This commit updates the API documentation for the `/users` endpoint with new information.
Style:
- This commit fixes inconsistent indentation in the `main` component for better code readability.
Refactor:
- This commit refactors the `getUserData` function name to `fetchUserData` for improved clarity.
Test:
- This commit adds unit tests for the `calculateTotal` function to ensure its correctness.
Chore:
chore: update dependencies to their latest versions
Additional Notes:
The first line starts with the type of change, followed by a colon ( : ). Here are the common
types:
feat : New feature
fix : Bug fix
docs : Documentation change
style : Code style changes (formatting, indentation)
refactor : Code refactoring (improvements without adding new features or fixing bugs)
test : Adding or refactoring tests
chore : Maintenance tasks that don't directly impact the code (updating dependencies, setting
up tools)
The message should be written in the present tense.
You can optionally include a brief description of the change and a reference to a related issue
number (e.g., using (#issueNumber) ).
Keep the commit message concise and informative.
Aim for consistency in your commit messages across the project.