core.hooksPath being set makes it not possible to install
See original GitHub issueI have a laptop which has some mandaotry global settings for git, and I have not been able to enable pre-commit. I also tried doing
git config --global init.templateDir ~/.git-template
pre-commit init-templatedir ~/.git-template
But still get the message
[ERROR] Cowardly refusing to install hooks with `core.hooksPath` set.
hint: `git config --unset-all core.hooksPath`
Is there any work arounds for this?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Cowardly refusing to install hooks with `core.hooksPath` set
Requiring to edit a personal file/setting to be able to use a software does not seems acceptable to be me. Anyway, the workaround...
Read more >How to configure core.hooksPath for BitbucketServer 4.13
This is not an issue for our Bitbucket Server installation since there is only one user of git on the box, that being...
Read more >[ERROR] Cowardly refusing to install hooks with `core ...
git config --unset-all core.hooksPath $ pre-commit install [ERROR] Cowardly refusing to install hooks with `core.hooksPath` set. hint: `git ...
Read more >Support core.hooksPath - GitKraken User Suggestions
hooksPath config allows you to set a directory where the hooks are located for a repository. This is particularly useful if trying to...
Read more >githooks Documentation - Git
Before Git invokes a hook, it changes its working directory to either $GIT_DIR in ... The second parameter is the branch being rebased,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I did
And it looks like adding the uninstall step did make it work and now it reports
pre-commit installed at /Users/damien/.git-template/hooks/pre-commitcool