git init template, replacing modified hooks

天大地大妈咪最大 提交于 2019-12-23 17:06:13

问题


I am constantly updating my local git hooks. I have a repo to house my .git template. This means that I am constantly running git init --template=../git-template to update repos with my hook changes.

Problem: Everytime I run git init --temp..., I need to first remove the hooks in .git/hooks that will be replaced with the updated hooks. This is annoying. I know I can script the removal of these hooks from the repo that I want to update, but is this functionality built into git already?


回答1:


This doesn't exactly answer your question, but I just symlink all my .git/hooks folders to a common location so I can just modify that; that might make your life easier



来源:https://stackoverflow.com/questions/3007051/git-init-template-replacing-modified-hooks

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!