美文网首页
git commit时pre-commit提示e have no

git commit时pre-commit提示e have no

作者: 心大的少年 | 来源:发表于2020-11-12 18:11 被阅读0次

    我们的项目用到了commitline和pre-commit,但是不知道为什么突然间执行commit的时候会提示一段莫名奇妙的信息:

    pre-commit:
    pre-commit: We have nothing pre-commit hooks to run. Either you're missing the `scripts`
    pre-commit: in your `package.json` or have configured pre-commit to run no the `scripts`thing.                                                                    thing.
    pre-commit: Skipping the pre-commit hook.
    pre-commit:
    

    解决办法:
    再package.json的中加上

      "scripts": {
        "precommit-msg": "echo 'Pre-commit checks...' && exit 0"
      },
    "pre-commit": [ "precommit-msg", "lint" ],
    

    相关文章

      网友评论

          本文标题:git commit时pre-commit提示e have no

          本文链接:https://www.haomeiwen.com/subject/kerbbktx.html