observing / pre-commit

Automatically installs a git pre-commit script in your git repository which runs your `npm test` on pre-commit
MIT License
1.88k stars 153 forks source link

Document how to turn this off permanently #142

Open kevinburkenotion opened 5 years ago

kevinburkenotion commented 5 years ago

I don't ever want a library to modify my pre-commit hooks, even if a package maintainer adds this package. How can I disable this library from ever editing .git/hooks/pre-commit?

Husky for example has HUSKY_SKIP_INSTALL=true.

magicznyleszek commented 2 years ago

Similar problem happens when one branch has pre-commit installed, but another one doesn't have it. This package makes it impossible to commit anything on the other branch and simple npm install doesn't solve the issue.

FlorianWendelborn commented 2 years ago

As a workaround, when using the terminal you can usually just pass --no-verify to any git command to disable hooks. Still think this issue is important though as this doesn’t necessarily work for git GUIs

magicznyleszek commented 2 years ago

My workaround is to go to .git/hooks/ and delete the leftover pre-commit file :)