Reputation: 75
I'm new to git and have written a post-merge hook for a repo on my machine. It looks like hooks can't be tagged as part of the repo. What is the best method for deploying this hook to other developers?
Upvotes: 4
Views: 1574
Reputation: 1218
We use a separate repo at my place of employment that contains a bunch of hooks for controlling commits (message format, etc), and a script that installs them.
We are also using msysgit, and someone has rigged up an automatic process when you open msysgit that updates this repo, and runs the required script automatically. This is achieved by calling a script from the .profile in your home directory, which is read by msysgit on opening.
As jthill commented though, this would require the persons cooperation, as they can stop this process at any time. For instance, I am about to blow Windows away and run linux for my development, and this process will no longer work. I will take care of writing a linux-friendly script and adding it to the repo I suspect.
Upvotes: 6