From b0f8db72b7c0fb9c5ddeb58954c8a6a6b2ee26ef Mon Sep 17 00:00:00 2001 From: typicode Date: Thu, 21 Oct 2021 04:24:02 +0200 Subject: [PATCH] docs: improve uninstall instructions --- docs/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 5ab2c018a..223212d7d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -137,7 +137,7 @@ _For Windows users, if you see the help message when running `npx husky add ...` ### Uninstall ```shell -npm uninstall husky +npm uninstall husky && git config --unset core.hooksPath ``` ## Yarn 2 @@ -373,6 +373,12 @@ export NVM_DIR="$HOME/.nvm" 1. Verify that hook files are executable. This is automatically set when using `husky add` command but you can run `chmod +x .husky/` to fix that. 1. Check that your version of Git is greater than `2.9`. +## .git/hooks/ not working after uninstall + +If after uninstalling `husky`, hooks in `.git/hooks/` aren't working. Run `git config --unset core.hooksPath`. + +Note: this was done automatically by `npm <7` when uninstalling husky, however `preuninstall` is now unsupported. + ## Yarn on Windows Git hooks may fail when using Yarn on Windows with Git Bash (`stdin is not a tty`). If you have users on Windows, it's highly recommended to add the following workaround.