git commit提交规范

本文介绍了如何参照Angular的提交规范进行Git提交,包括提交的header、body和footer三部分,以及各部分的具体内容。通过使用如'feat'、'fix'等类型来区分不同的代码变更,并推荐了vscode中的git-commit-plugin插件辅助规范提交,以提高团队代码管理和协作效率。
摘要由CSDN通过智能技术生成

Git提交规范可以参考Angular的提交规范说明

每个提交都包含header、body和footer三个部分,格式如下:

<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>

header有三个部分:type、scope和subject,其中scope是可选的

type有以下几种:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing or correcting existing tests
  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation

vscode中可以使用插件git-commit-plugin来辅助规范提交
git-commit-plugin

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值