feat, fixperf, refactor, style, testbuild, ci, chore, docsrevertfeatFeature.
Indicates that this commit adds a new feature that affects users.
Example:feat: add user login API
fixFixes a bug.
Indicates that this commit resolves a known issue or defect.
Example:fix: handle null pointer exception
docsDocumentation only.
Used when only documentation changes are made, such as README updates or comments, without affecting runtime behavior.
Example:docs: update installation guide
styleCode formatting or style.
Used for formatting-only changes such as spacing, semicolons, or indentation, with no behavior changes.
Example:style: reformat code with prettier
refactorRefactoring.
Improves the structure of existing code without adding features or fixing bugs. The goal is to make the code clearer and easier to maintain.
Example:refactor: extract helper function
perfPerformance optimization.
Used for changes made specifically to improve performance.
Example:perf: reduce API response time
testTests.
Adds or updates unit tests or integration tests without changing production logic.
Example:test: add test for login service
buildBuild-related changes.
Affects the build system or external dependencies, such as gulp, webpack, or npm scripts.
Example:build: update webpack config
ciContinuous integration.
Used for changes to CI configuration or scripts, such as GitHub Actions, Travis, or Jenkins.
Example:ci: add deployment workflow
choreMiscellaneous maintenance.
Used for tasks that do not fit any of the categories above, such as dependency updates or maintenance work.
Example:chore: update dependencies
revertReverts a previous commit.
Used to roll back an earlier commit.
Example:revert: revert commit 1a2b3c