git - 关于 git 中常规提交消息的问题

标签 git conventional-commits

我正在努力适应 常规提交消息 ,在此描述 article .

这是文章的一个片段:

允许 <type>值(value)观:

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/c 很难归类为这种类型。我将列出一些更改 w/c 我发现对使用什么类型感到困惑

在这种情况下我应该使用什么类型
  • 我在现有组件(react、angular、vue 等)上添加了 css 样式
  • 我在我的项目中编辑了配置文件,例如 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

    我认为对于您的一些观点,例如“删除文件”,这可能取决于 为什么你正在删除它。例如,删除一个文件,因为您已将其代码移动到更合乎逻辑的位置 - 它可能是 重构 .

    关于git - 关于 git 中常规提交消息的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61262376/

    相关文章:

    git - 如何更改 Git 中先前提交之一的提交消息?

    linux - 使用 gitosis 使 GIT 存储库对某些用户只读

    git - 在 webroot 目录而不是 ~/.ssh 中克隆时权限被拒绝(公钥)

    javascript - Lerna 能否根据 Conventional Commits 规范提升预发布版本?

    git - 如何根据常规提交规范对 UI 更改进行分类?

    Git WebHook(PHP)无法访问ruby环境,以apache用户运行jekyll

    git push 显示 "Everything up-to-date"但比较显示差异

    git - 何时使用 "chore"作为提交消息的类型?

    git - 在功能完成之前提交类型