?問題描述:
git commit 時(shí)控制臺(tái)報(bào)錯(cuò):
? 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
husky - commit-msg hook exited with code 1 (error)
由于項(xiàng)目使用了husky,在提交前對代碼規(guī)范進(jìn)行了校驗(yàn),導(dǎo)致報(bào)錯(cuò)
這種情況下無法直接push o(╥﹏╥)o
? 解決方案:
commit 時(shí)加上提交信息:“fix: xxxxx”,比如:
git commit -m "fix: 初始化項(xiàng)目"
提交后就可以順利push了 O(∩_∩)O文章來源:http://www.zghlxwxcb.cn/news/detail-502982.html
?文章來源地址http://www.zghlxwxcb.cn/news/detail-502982.html
到了這里,關(guān)于git提交時(shí)報(bào)錯(cuò):husky-commit-msg hook exited with code 1 (error)的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!