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

Re: global hooks

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 20, 2008, 02:25 UTC
Message-ID
<7vk5jyyvw1.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1205942671.691.8.camel@omicron.ep.petrobras.com.br>
Victor Bogado da Silva Lins <victor@bogado.net> writes:
> SO my question is, is there a way to make that hook global to all
> projects? If not, would it be a good idea to allow this?

Probably a post- git-init hook that lets you do anything to your newly created repository would be the only thing that you need. Then you can copy, untar or even use symlink to muck with .git/hooks/ in whatever way you please.

There needs a mechanism for you to specify what that hook is, and it cannot be in individual repositories, so it has to live in ~/.gitconfig somewhere.

Previous: Jonathan del StrotherNext: Johan Herland
Message 3 of 6 in “global hooks”
  1. Victor Bogado da Silva LinsMar 19, 2008
  2. Jonathan del StrotherMar 20, 2008
  3. Junio C HamanoMar 20, 2008
  4. Johan HerlandMar 20, 2008
  5. Ping YinMar 20, 2008
  6. Johan HerlandMar 20, 2008

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.