Git-commitlint

Git-commitlint

commitlint:在多人协作的背景下,git 仓库和 workflow 的作用很重要。而对于 commit 提交的信息说明存在一定规范,现使用 commitlint + husky 规范 git commit -m "" 中的描述信息。

1,问题描述

git提交时,报错如下

bash 复制代码
✖   subject may not be empty [subject-empty]
✖   type may not be empty [type-empty]

✖   found 2 problems, 0 warnings
ⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

2,解决

按照规范来

bash 复制代码
/**
 * build 编译相关的修改,例如发布版本、对项目构建或者依赖的改动
 * chore 其他修改, 比如改变构建流程、或者增加依赖库、工具等
 * docs 文档修改
 * feat 新特性、新功能
 * fix 修改bug
 * perf 优化相关,比如提升性能、体验
 * refactor 代码重构
 * revert 回滚到上一个版本
 * style 代码格式修改
 * test 测试用例修改
/
git commit -m "feat: 新功能"

或者避免commitlint工具的检查

相关推荐
敲敲敲-敲代码7 小时前
git安装记录
git
我是人✓7 小时前
Git入门:从零开始掌握分布式版本控制
分布式·git
Aurora_eye8 小时前
Git 笔记
笔记·git
解道Jdon9 小时前
FigCraft把Figma用Rust从零重写了一遍
ide·windows·git·svn·eclipse·github·visual studio
橙橙笔记11 小时前
QT安卓软件的制作
android·git·qt·软件
我是人✓11 小时前
Git远程协作与标签管理全攻略
git
闰土_RUNTU12 小时前
Git实用手册(持续更新)
git
Shaoshing12 小时前
ggggggggit
git
Lucky GGBond13 小时前
解决 Git 推送报错:Could not resolve host 及 DNS 劫持排查指南
git
川石课堂软件测试13 小时前
自动化测试|持续集成Git使用详解
git·python·jmeter·mysql·ci/cd·容器·kubernetes