不要创建 git 预提交挂钩
Don't create git pre-commit hook
在我的package.json
里面我有"pre-commit": ["lint"]
。我可以 运行 yarn install
不创建预提交挂钩吗?
你已经拥有的那一刻
"husky": {
"hooks": {
"pre-commit": "lint"
}
在您的 package.json
中,每当您 运行 yarn install
时,纱线都会从 package.json
中提取信息并安装可用的信息,所以我建议您是否真的想制作如果您的安装没有在 .git/hooks/pre-commit
中创建文件,您可能必须从 package.json
.
中删除 "pre-commit": ["lint"]
如果您的问题来自 运行 宁 git commit
,您可能需要使用
git commit --no-verify
-n
--no-verify
This option bypasses the pre-commit and commit-msg hooks. See also githooks(5).
您可以从 git-commit(1) Manual Page
获得更多信息
希望对您有所帮助。
在我的package.json
里面我有"pre-commit": ["lint"]
。我可以 运行 yarn install
不创建预提交挂钩吗?
你已经拥有的那一刻
"husky": {
"hooks": {
"pre-commit": "lint"
}
在您的 package.json
中,每当您 运行 yarn install
时,纱线都会从 package.json
中提取信息并安装可用的信息,所以我建议您是否真的想制作如果您的安装没有在 .git/hooks/pre-commit
中创建文件,您可能必须从 package.json
.
"pre-commit": ["lint"]
如果您的问题来自 运行 宁 git commit
,您可能需要使用
git commit --no-verify
-n
--no-verify
This option bypasses the pre-commit and commit-msg hooks. See also githooks(5).
您可以从 git-commit(1) Manual Page
获得更多信息希望对您有所帮助。