git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Jakub NarebskiNext: Marlene Cote
Message 3 of 4 in “help for a git newbie please”
  1. Marlene CoteDec 29, 2010
  2. Jakub NarebskiDec 29, 2010
  3. shared hooks (Re: help for a git newbie please)Jonathan Nieder, Dec 29, 2010
  4. Marlene CoteDec 29, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.