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

Why isn't there a hook for all operations that update the working tree?

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 28, 2011, 11:59 UTC
Message-ID
<CACBZZX7dJhGT0H8JZRbQ_t9mNnJocaktYAXgMSihfLBuFmL3nw@mail.gmail.com>

I have a repository where I'd like to run a program every time the working tree is updated. githooks(5) specifies that you can use post-{checkout,merge} hooks to hook into those two operations.

However that doesn't catch e.g. "git reset --hard". Is there any reason beside omission that there isn't a post-reset hook? Or hooks for any other thing (most of which surely slip my mind) which can update the working tree?

Next: Neal Kreitzinger
Message 1 of 3 in “Why isn't there a hook for all operations that update the working tree?”
  1. Ævar Arnfjörð BjarmasonJul 28, 2011
  2. Neal KreitzingerAug 4, 2011
  3. Junio C HamanoAug 4, 2011

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.