type
status
date
slug
summary
category
tags
icon
password
In Git, a standard commit message typically follows these conventions (Angular convention is one of the most popular):
1. Basic Format
2. Type (Required)
Common prefixes (lowercase):
feat
: new feature
fix
: bug fix
docs
: documentation changes
style
: code formatting changes
refactor
: code refactoring (no new features or bug fixes)
perf
: performance improvements
test
: adding or modifying tests
chore
: other changes (build process or auxiliary tool changes)
3. Scope (Optional)
Indicates the scope of the commit, for example:
4. Subject (Required)
- Use imperative, present tense
- Start with a lowercase letter
- Don't end with a period
5. Real Examples
6. Complete Example
7. Recommendations
- Keep it concise, but include enough information
- Use English
- One commit should do one thing
- Review changes before committing
- Author:Zhenye Dong
- URL:https://dongzhenye.com/article/how-to-write-git-commit-messages
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!