From 635b5553664d5a06afa78a14540cdbacead4b07b Mon Sep 17 00:00:00 2001 From: Adolfo Rodriguez Date: Fri, 8 Mar 2024 10:50:44 -0800 Subject: [PATCH] Advise user to unset core.hooksPath git config globally as well as locally --- pre_commit/commands/install_uninstall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre_commit/commands/install_uninstall.py b/pre_commit/commands/install_uninstall.py index d19e0d47..ac36b8d8 100644 --- a/pre_commit/commands/install_uninstall.py +++ b/pre_commit/commands/install_uninstall.py @@ -123,7 +123,7 @@ def install( if git_dir is None and git.has_core_hookpaths_set(): logger.error( 'Cowardly refusing to install hooks with `core.hooksPath` set.\n' - 'hint: `git config --unset-all core.hooksPath`', + 'hint: `git config --unset-all core.hooksPath && git config --unset-all --global core.hooksPath`', ) return 1