gmc
Worktree

Hooks

Run commands after worktree creation.

gmc wt hook manages commands that run after shared resources are synced into a new worktree.

Add a hook

gmc wt hook add "pnpm install"
gmc wt hook add "pnpm install && pnpm build" --desc "Install dependencies"

List hooks

gmc wt hook

Remove a hook

gmc wt hook remove 1

Notes

Hooks are useful for dependency installation, generated files, or repo-local setup that every new worktree needs.

On this page