Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij: Before commit: run git hooks

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

can you please help?

thanks

enter image description here

like image 987
Mike Rodov Avatar asked Dec 04 '18 07:12

Mike Rodov


1 Answers

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

Its amazingly simple, just install it:

npm install pre-commit --save-dev

and add this to your package.json

{
  "pre-commit": ["test", "build"],
}

and you're golden

like image 56
Mike Rodov Avatar answered Sep 19 '22 08:09

Mike Rodov