Repository navigation
Conventional Commits
-
Conciseness: Strive to create short yet descriptive commit messages. Use as few words as possible to clearly explain the introduced changes.
-
Description of Changes: Commit messages should include information about what has been changed or added. Avoid vague messages that don't clarify the essence of the changes.
-
Use Present Tense: Use the present tense in commit messages as changes are presented as actions that have been taken.
-
Avoid Unnecessary Details: Refrain from providing information that is already evident in the code or is too obvious. Focus on the crucial aspects of the changes.
-
Use Action Verbs: Naming changes with action verbs in the present tense (e.g., "Add," "Update," "Delete") helps precisely define what has been done.
-
Avoid Naming Multiple Changes in One Commit: Try to focus on a specific and single change in each commit message. This makes tracking the history of changes in the repository easier.
-
Check Spelling and Punctuation: Ensure that commit messages are well-written without spelling or punctuation errors.
-
Acronyms and Abbreviations: When dealing with long commit messages, you may use acronyms or abbreviations, provided they are clear to other team members.
feat: New functionality
fix: Fix to an existing functionality
docs: Changes only in documentation
chore: Changes that do not affect the source code or tests (e.g., package updates)
refactor: Changes that are neither fixes nor new features
tests: Changes related to tests (addition or modification)
perf: Code changes that improve performance
styles: Code formatting, white spaces, commas, or missing semicolons
ci: Changes related to Continuous Integration (configs, scripts)
build: Changes affecting the build process
revert: Revert previous changes
The ideal commit message should:
- Concisely describe the changes that occurred in the code.
- Be in the imperative present tense. This means it should use commands like "add," "update," "fix," etc., instead of descriptive phrases like
added polish translationsoradding polish translations.Instead, it should beadd polish translations
refactor: refactor code for better performance
fix: fix bug in login validation
feat: add user profile feature
Following these guidelines for commit message names helps maintain clarity in the history of changes in the repository, facilitating team collaboration and code debugging. Strive to be consistent in naming commit messages to make reviewing and understanding changes easier.