shared hooks (Re: help for a git newbie please)
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Dec 29, 2010, 19:17 UTC
- Message-ID
- <20101229191717.GA19195@burratino>
- In-Reply-To
- <m3k4iscsq2.fsf@localhost.localdomain>
Jakub Narebski wrote:
> Now, if you either use some kind of networked filesystem, or you can > configure it so each developers machine has the same install, you can > make use of git templates mechanism.
To expand on this: if you are in the "controlled environment" situation, you may find the discussion pointed to by [1] interesting.
If you do not control developer machines, life is even simpler. One approach[2] is to track a git-templates/ directory in the working tree and add a setup-hooks.sh script that installs those hooks in .git/hooks.
[1] http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/776932 Summary: it is easier to change hooks later if you keep hooks in some directory outside the template dir (e.g., in /etc/hooks) and put a symlink to that directory in the template. [2] e.g., used by the libreoffice repository iirc