# 約定式提交(Conventional Commits) ## 簡介 一個符合Conventional Commits規範的提交信息樣板 ``` <type>[optional scope]: <description> [optional body] [optional footer(s)] ``` ### Example ``` fix: correct minor typos in code see the issue for details on typos fixed. Reviewed-by: Z Refs #133 ``` ## Commit Types 1. **feat**:新功能。 2. **fix**:修復 bug。 3. **docs**:文件。 4. **style**:coding style 的調整,例如:空白、分號、空格等,不影響程式碼的內容。 5. **refactor**:重構現有程式碼,不屬於新增新功能或是修 bug。 6. **perf**:提升效能的改進。 7. **test**:新增或修改測試。 8. **build**:和打包或外部依賴相關的修改,例如:npm、gulp、broccoli。 9. **ci**:與 CI 設定檔或 script 相關的修改,例如:Travis、Circle、BrowserStack、SauceLabs。 10. **chore**:其他,並且也不會修改原始碼或是測試,例如:storybook 的新增或變更。 11. **revert**:回復前一個提交的 commit。 ## Refs [https://www.conventionalcommits.org/zh-hant/v1.0.0/](https://www.conventionalcommits.org/zh-hant/v1.0.0/) [https://www.cythilya.tw/2021/03/16/conventional-commits/](https://www.cythilya.tw/2021/03/16/conventional-commits/) [https://kahnsen.github.io/kahnblog/2020/05/15/Git-Commit-Message规范/](https://kahnsen.github.io/kahnblog/2020/05/15/Git-Commit-Message%E8%A7%84%E8%8C%83/)