我丢失了沙哑的预提交钩。现在,我的.git/hooks/pre-commit
为空。如何使赫斯基重新添加其脚本?
{
"private": true,
"scripts": {
"start": "lerna run start",
},
"workspaces": [
"packages/*"
],
"devDependencies": {
"cross-env": "^5.2.0",
"husky": "3.0.3",
"lerna": "^3.13.2",
"precise-commits": "^1.0.2",
"prettier": "^1.17.0",
},
"husky": {
"hooks": {
"pre-commit": "precise-commits"
}
}
}
yarn remove husky -W && yarn add husky -E -D -W
不足以更新预提交挂钩。