Git hooks management

前端 未结 6 829
梦毁少年i
梦毁少年i 2020-12-14 02:22

We use custom-written Git hooks in our project.

Hooks are stored in a project\'s repository, and, when they do change, to get a new version each user must copy them

6条回答
  •  执念已碎
    2020-12-14 02:44

    You could make the repository's .git directory a git repository, and just add hooks and other config to it, adding the objects, refs, etc. directories and files like index to its .gitignore. Not only that, but you could set up a post-receive hook to update the metarepo from its origin. Once you had the initial configuration set up, you could have it pull in updates without any additional effort.

    I'm working out the details of this, like what should go in the ignore list; I'm keeping the results in branches of this repo.

提交回复
热议问题