clone.defaultRemoteName
in .gitconfig
causes remote configurations to fail
#826
Labels
bug
Something isn't working
🔧 Summary
When the global
.gitconfig
file definesclone.defaultRemoteName
, Lefthook fails onlefthook install
when it attempts to sync hooks from a remote configuration.Lefthook version
1.7.17
Steps to reproduce
clone.defaultRemoteName
to something other thanorigin
.For example:
lefthook.yml
file withremotes
.For example:
lefthook install
to clone the remote repository.lefthook install
again to sync the hooks. This is when the error occurs.clone.defaultRemoteName
was not configured prior to step 1, you can undo it again so that it won't mess things up later on your computer 😅Expected results
Lefthook should not raise an error:
Actual results
Possible Solution
I think a possible solution would be to specify the
--origin
flag when cloning the remote repository, as it would override theclone.defaultRemoteName
setting.For example:
Logs / Screenshots
From step 3:
From step 4:
The text was updated successfully, but these errors were encountered: