IDEA或者Webstorm提交代码commit报错

时间:2025-04-01 09:47:14

类似这样的报错

Commit failed with error
			0 file committed, 3 files failed to commit: 样式和函数实现
			> running pre-commit hook: npm run precommit	
			> ant-design-pro@4.2.1 precommit 。。。
			> lint-staged
			
			[STARTED] Preparing...
			[SUCCESS] Preparing...
			[STARTED] Running tasks...

解决方法:使用强制提交

git commit --no-verify -m "commit"