如何用哈士奇更新钩子

时间:2019-08-14 12:38:16

标签: git husky git-husky

我丢失了沙哑的预提交钩。现在,我的.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不足以更新预提交挂钩。

0 个答案:

没有答案