Reputation: 2038
When I update global git hooks, and make git init
in repo hooks don't get updated. How to update them?
Upvotes: 0
Views: 863
Reputation: 1599
When you do the first git init
from your local repo, the git
will copy the global hooks into the .git/hooks
directory of the git repo you are working only if it's not there.
Solution is, delete the hook from .git/hooks
directory of your local repository.
Upvotes: 0
Reputation: 2038
Turned out according to docs subsequent init in repo only add new files from template dir, but don’t update existing.
Upvotes: 0
Reputation: 96016
You need to run:
git config --global init.templatedir 'hooks_location'
Upvotes: 2