Ila*_*aja 44
只需pre-commit
通过shell 运行脚本:
bash .git/hooks/pre-commit
Run Code Online (Sandbox Code Playgroud)
Yic*_*hun 14
就跑git commit
。在执行此操作之前您无需添加任何内容,因此最终您会收到消息no changes added to commit
。
如果要手动运行存储库上的所有预提交挂钩,请运行
pre-commit run --all-files
。要运行单个钩子,请使用pre-commit run <hook_id>
。
所以pre-commit run --all-files
是OP是什么之后。