Use post-create hooks in wtp
mainHooks are executed automatically after a worktree is created. They are processed in the order they are defined and their output is streamed to the terminal.
Supported Hook Types
copy: Copies files from a source to a destination. For relative paths, iftois omitted, it defaults to the value offrom.command: Executes a shell command. By default, these commands run within the context of the newly created target worktree.symlink: Creates symbolic links.
Hook Environment Variables
When running a command hook, the following environment variables are available to your script:
GIT_WTP_WORKTREE_PATH: The path to the new worktree.GIT_WTP_REPO_ROOT: The root path of the main git repository.