Git Commit Conventions Explained in Chinese
/ 1 min read /
#git
#笔记
These are the commonly used commit types defined in the @commitlint/config-conventional configuration. The meaning of each type is as follows:
- build: Changes that affect the build system or external dependencies (e.g., gulp, broccoli, npm)
- chore: Other changes that do not modify source code or test files. Typically used for maintenance work.
- ci: Changes to continuous integration configuration files and scripts (e.g., Travis, Circle, BrowserStack, SauceLabs)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: Code changes that improve performance
- refactor: Code changes that neither fix a bug nor add a feature
- revert: Reverts a previous commit
- style: Changes that do not affect the meaning of the code (whitespace, formatting, missing semicolons, etc.)
- test: Adding missing tests or correcting existing tests
These types help developers quickly understand the purpose of each commit, making the version history clearer and facilitating automated tools to generate changelogs. Using these standardized commit types can improve project maintainability and collaboration efficiency.