有没有办法跟踪 git hook 的变化?我有三个钩子(Hook)只出现在我的机器上,而不是当我的其他开发人员获取时。尝试 git add
不起作用。
最佳答案
http://benjamin-meyer.blogspot.com/2008/10/git-hooks.html
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.
关于git - 跟踪 .git/hooks 中钩子(Hook)的变化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4457031/