跟踪对.git / hooks中钩子的更改 [英] Tracking changes to hooks in .git/hooks

查看:160
本文介绍了跟踪对.git / hooks中钩子的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法跟踪git钩子的变化?我有三个钩子只显示在我的机器上,而不是当我的其他开发人员抓取时。试图 git add 不起作用。

解决方案

http://benjamin-meyer.blogspot.com/2008/10/git-hooks.html


.git / hooks目录中的文件不是存储库的一部分,因此不会被跟踪。解决方法是在您的存储库顶部有一个git_hooks目录,就像在Arora中完成的一样,并且在克隆时将git_hooks设置为符号链接.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.

解决方案

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 / hooks中钩子的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆