git - 关于 git 中常规提交消息的问题
问题描述
我正在尝试适应本文中描述的常规提交消息。
这是文章的一个片段:
允许<type>
值:
feat (new feature)
fix (bug fix)
docs (changes to documentation)
style (formatting, missing semi colons, etc; no code change)
refactor (refactoring production code)
test (adding missing tests, refactoring tests; no production code change)
chore (updating grunt tasks etc; no production code change)
但有时有一些变化很难归类为这种类型。我将列出一些更改,其中 w/ci 对使用哪种类型感到困惑
在这种情况下我应该使用什么类型
- 我在现有组件上添加了一个 CSS 样式(反应、角度、vue 等)
- 我在我的项目中编辑了配置文件,例如
package.json
,.prettierc
等。 - 重命名文件
- 删除文件
解决方案
您所指的是来自 Angular 的提交规则的启发:
https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits
另见:
https://github.com/commitizen/conventional-commit-types/blob/master/index.json
https://github.com/pvdlg/conventional-commit-types
我认为对于您的一些观点,例如“删除文件”,这可能取决于您删除它的原因。例如,删除一个文件,因为您已将其代码移动到更合乎逻辑的位置 - 它可能是一个重构。
推荐阅读
- android - 尝试将歌曲上传到 Firebase 和应用程序失败,但有异常
- google-cloud-speech - 'google-cloud-speech' 语音到文本的 JSON 输出返回不可读的文本
- c - 如何用变量画一条线
- python - pygame 中的自定义 RL 环境 - 关于定义时间步长的问题
- python - 不知道最后一页时如何在python中遍历多个页面
- google-maps-api-3 - 谷歌地图显示在本地主机上,但在部署时不显示
- java - BMI 按钮检查性别
- flutter - 如何转换 _list(QuerySnapshot
- python - 将二维数组中的值设置为等于字符
- typescript - 从类对象属性更新 Vue