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工具的检查

相关推荐
ficker138 小时前
git常用命令
git
kevin_cat13 小时前
微信群机器人-备份文件发送通知
git·bash·企业微信
程序媛Dev16 小时前
50.4k Star!我用这个神器,在五分钟内搭建了一个私有 Git 服务器!
运维·服务器·git
澈轩19 小时前
Git 用得好,下班走得早
git
人间造梦工厂20 小时前
Git Bash 别名
git
画个太阳作晴天1 天前
解决 Android Studio 中 build 目录已被 Git 跟踪后的忽略问题
git
wjs0401 天前
Git常用的命令
java·git·gitlab
原野风霜3241 天前
Git使用总结
git
青草地溪水旁1 天前
Git Bash 中 Git 命令的实用主义指南
git·bash
至善迎风1 天前
版本管理系统与平台(权威资料核对、深入解析、行业选型与国产平台补充)
git·gitee·gitlab·github·svm