【发布时间】:2019-02-05 08:43:21
【问题描述】:
我已经用 Husky 实现了 pre-push 钩子。现在我想删除它。
问题是yarn remove husky 之后,.git/hooks 内部仍然存在 git 钩子。
因为每次我想提交或切换分支或提交时都会收到此错误,因此甚至无法提交 -->
.git/hooks/pre-commit: line 6: node_modules/run-node/run-node: No such file or directory
我知道我总是可以删除.git/hooks 中的每个钩子,但是我如何远程推送这些更改?如何不强迫我的队友做同样的事情?
我也知道我可以使用-n 标志提交,但我仍然不想这样做。
【问题讨论】: