Question

Is there a possibility to nicely version and track git hooks? Can I safely have another (nested) git repository under the hook folder on server?

Was it helpful?

Solution

Nothing prevents you to add your gitolite server hooks to a admin repo (or even the gitolite admin repo, where you are adding public ssh keys and the config file for all the repos and associated rights).

However pushing that admin repo back to the gitolite server won't trigger anything hook-wise.
You will still have to go to the hook folder on the server and:

  • have a hook which will checkout the content of that admin repo
  • make symlinks from each of the hooks in your server folder to the one versioned to your (checked out) admin repo.

It seems clearer to have a dedicated repo for server hooks (itself declared in Gitolite), instead of burying a Git repo within a technical folder of Gitolite.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top