From: Kristoffer Haugsbakk Date: Sun, 20 Sep 2026 18:25:45 GMT Subject: Re: [RFC] worktree: add lifecycle hooks Message-ID: In-Reply-To: <20260920173333.1606-1-maciej.ciemborowicz@gmail.com> On Sun, Sep 20, 2026, at 19:33, Maciej Ciemborowicz wrote: > Hello, > > I'd like to discuss adding native hooks for worktree lifecycle events. > > Git currently invokes `post-checkout` after `git worktree add` when a > checkout is performed. This makes it possible to detect some worktree > creation cases indirectly. There does not appear to be a native hook for > other worktree lifecycle operations such as: > > git worktree add > git worktree remove > git worktree move > git worktree lock > git worktree unlock > git worktree prune >[snip] See https://lore.kernel.org/git/7c8b4673-37ac-45fa-ad8c-a1dc09afe5fe@mtasv.net/