5

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?

Olha Puzhay
  • 370
  • 2
  • 9
  • why not just try it out? I did and found it's working... – eckes Feb 16 '12 at 11:04
  • @eckes, thx. Did you do a local repository or also put this into gitolite repo? There might happen some recursion... Just didn't want to break the live system. – Olha Puzhay Feb 16 '12 at 11:35

1 Answers1

1

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250