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

Re: git hooks to run something

From
Jeff King <peff@peff.net>
Date
Mar 25, 2009, 11:25 UTC
Message-ID
<20090325112507.GA4437@coredump.intra.peff.net>
In-Reply-To
<556d90580903250333l496520ao5fde64fb08faf9ae@mail.gmail.com>

[re-adding git@vger to cc; please keep questions on-list so that others can also help to answer]

On Wed, Mar 25, 2009 at 11:33:39AM +0100, Alf Clement wrote:
> is there a way to push a modified hook script with the repository when
> I push it to a server?
> And how to get it with pull?

No; for security reasons, no code (including hooks) from remote repositories is automatically run. The usual method is to include the hook in your repository and copy it into place after cloning.

-Peff
Previous: Jeff King
Message 3 of 3 in “git hooks to run something”
  1. Alf ClementMar 24, 2009
  2. Jeff KingMar 24, 2009
  3. Jeff KingMar 25, 2009

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.