Skip to content

Files

Latest commit

 

History

History

pre-commit-hook

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

The no-commit.sh file can be used as a pre-commit hook.
When any of the files that you want to commit contain the word 'nocommit' the commit will fail.

see this Blog Post

note: when we use npm we can use husky to automatically execute the script as a pre-commit hook.

example:

  "pre-commit": "sh ./tools/no-commit.sh"