Hans Hans - 5 months ago 31
Git Question

Tracking changes to hooks in .git/hooks

Is there a way to track git hook changes? I have three hooks that only show up on my machine, not when my other developers fetch. Trying to

git add
doesn't work.

Answer Source


Files in the .git/hooks directory are not part of the repository and so they are not tracked. A workaround is to have a git_hooks directory at the top of your repository like done in Arora and symlink .git/hooks to git_hooks whenever you clone. This way the hooks will be part of the project, under revision control and accessible to everyone.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download