Intellij:提交之前:运行git hooks [英] Intellij: Before commit: run git hooks
本文介绍了Intellij:提交之前:运行git hooks的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想启用运行git钩子"在提交之前,我知道它是可行的,因为我曾经启用过它(在一个项目中,如下图所示)
I want to be enable "run git hooks" before commit, I know its possible since i enabled it once (in one project, depicted below)
但是我不记得/弄清楚如何在另一个项目中做到这一点
but i cant remember / figure out how to do this in another project
可以帮忙吗?
谢谢
推荐答案
当时我找不到它,但是后来我找到了,所以只想与大家分享.
Back then i couldn't find it, but later on i did, so just wanted to share it with you guys.
以下软件包将为您完成预提交
The following package will do it for you pre-commit
它非常简单,只需安装:
npm install pre-commit --save-dev
并将其添加到您的package.json
{
"pre-commit": ["test", "build"],
}
你很黄金
这篇关于Intellij:提交之前:运行git hooks的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文