当前位置: 首页 > Linux

gitcommit报错(husky-commit-msghookfailed)

时间:2023-04-06 07:01:50 Linux

报错信息?guchejia_web_appgit:(5.1.1)?gitcommit-am"[feat]:修改弹窗"警告:在package.json中设置commit-msg脚本>scriptswillbedeprecatedPleasemoveittohusky.hooksinpackage.json,一个.huskyrc文件,或者一个husky.config.js文件,或者运行./node_modules/.bin/husky-upgrade来自动更新,使用方法见https://github.com/typicode/huskyhusky>commit-msg(nodev8.9.0)?input:[feat]:修改弹窗?subjectmaynotbeempty[subject-empty]?typemaynotbeempty[type-empty]?found2problems,0warnings?获取帮助:https://github...gitresetHEAD..."tounstage)修改:npm-shrinkwrap.json修改:src/page/weibaochaxun/app.tsx修改:src/page/weibaochaxun/components/dialog/index.tsx修改:src/page/weibaochaxun/components/dialog/style.scss修改:src/page/weibaochaxun/components/payResultToast/index.tsx修改:src/page/weibaochaxun/components/payResultToast/style.scss修改:src/page/weibaochaxun/pages/tcDetail/index.tsx修改:src/page/weibaochaxun/weibaochaxun.html?guchejia_web_appgit:(uicheck)?gitpushoriginuicheckwarning:rediringtohttp://***/guchejia_web_app.git/Everythingup-to-date的原因是在终端输入gitcommit-am"**",代码提交时会触发pre-commithook。它会在Git提交信息之前检查代码风格。如果不符合相应的规则,就会报错。其检测规则是根据.git/hooks/pre-commit文件中的相关定义方案,在提交代码commit时忽略pre-commit校验的hook,加上参数--no-verify8fileschanged,5657inserts(+),5612个缺失(-)2。删除.git/hooks下的pre-commit文件,重新commit?guchejia_web_appgit:(5.1.1)ll.git/hookstotal264-rwxr-xr-x1a96staff1.4K10915:13applypatch-msg-rwxr-xr-x1a96staff478B10102019applypatch-msg.sample-rwxr-xr-x1a96员工1.4K10915:13commit-msg-rwxr-xr-x1a96员工896B10102019commit-msg.sample-rwxr-xr-x1a96员工3.2K10102019fsmonitor-watchman.sample-rwxr-xr-x1a96staff1.4K10915:13post-applypatch-rwxr-xr-x1a96staff1.4K10915:13post-checkout-rwxr-xr-x1a96staff1.4K10915:13post-commit-rwxr-xr-x1a96staff1.4K10915:13post-merge-rwxr-xr-x1a96staff1.4K10915:13post-receive-rwxr-xr-x1a96staff1.4K10915:13post-rewrite-rwxr-xr-x1a96staff1.4K10915:13post-update-rwxr-xr-x1a96staff189B10102019post-update.sample-rwxr-xr-x1a96staff1.4K10915:13pre-applypatch-rwxr-xr-x1a96staff424B10102019pre-applypatch.sample-rwxr-xr-x1a96staff1.4K10915:13pre-auto-gc-rwxrwxrwx1a96staff88B10915:13pre-commit-rw-r--r--1a96staff106B10915:13pre-commit.old-rwxr-xr-x1a96staff1.6K10102019pre-commit.sample-rwxr-xr-x1a96staff1.4K10915:13pre-merge-commit-rwxr-xr-x1a96staff1.4K10915:13pre-push-rwxr-xr-x1a96staff1.3K10102019pre-push.sample-rwxr-xr-x1a96staff1.4K10915:13pre-rebase-rwxr-xr-x1a96staff4.8K10102019pre-rebase.sample-rwxr-xr-x1a96staff1.4K10915:13预接收-rwxr-xr-x1a96staff544B10102019预接收.sample-rwxr-xr-x1a96staff1.4K10915:13prepare-commit-msg-rwxr-xr-x1a96staff1.5K10102019prepare-commit-msg.sample-rwxr-xr-x1a96staff1.4K10915:13push-to-checkout-rwxr-xr-x1a96staff1.4K10915:13sendemail-validate-rwxr-xr-x1a96staff1.4K10915:13更新-rwxr-xr-x1a96staff3.5K10102019update.sample3。卸载哈士奇