# worktree_picker: Improve discoverability of tasks as a creation setup mechanism \(\#61148\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/2230c1a5bf5d4d8191917714b61641a5ffded163)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 2230c1a5bf5d4d8191917714b61641a5ffded163

Requested commit: 2230c1a5bf5d4d8191917714b61641a5ffded163

Commit: 2230c1a5bf5d4d8191917714b61641a5ffded163

Tree: 4ccd3b917baf1d3562992c0e3110735503e8213c

Author: Danilo Leal

Committer: GitHub

## Message

```
worktree_picker: Improve discoverability of tasks as a creation setup mechanism (#61148)

Sometimes when creating Git worktrees, it's necessary to set things up
so the new worktree is ready. For example, copying env.vars, installing
dependencies, etc. That was already possible in Zed through the tasks
system, but you'd only maybe know about that if you read the
documentation or is super familiar with it already; nothing in the
product in the context of worktrees told you about that. This is what
this PR does.

Now, in the worktree picker, there's a "" button that opens the
`tasks.json` file exposing the `create_worktree` hook, which allows you
to plugin all sorts of things to be run by the time of a worktree
creation. If you don't already have a `tasks.json` file, we will create
a new one for you with a worktree-creation template. Otherwise, we
either append the `create_worktree` hook content to it or just open the
file.

Here's a quick video:


https://github.com/user-attachments/assets/21908be4-306b-4cf3-bed0-50d52cad9d79

Release Notes:

- Git Worktrees: Improved discoverability of the `create_worktree` hook
for setting up things that need to happen by the time of worktree
creation.
```

## Parents

- [f7d9ae33b5ce1debd2b5962aacc6f7641de2bb0e](https://git.cafe/gitcafe/zed/commit/f7d9ae33b5ce1debd2b5962aacc6f7641de2bb0e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/2230c1a5bf5d4d8191917714b61641a5ffded163?format=markdown)
