I created a small git worktree utility some might find useful when creating worktrees so you can work on a few tasks in your code base in parallel
------
Why did I create this?
------
Essentially raw worktrees are rough
1. You need to decide where in your file system to create them
2. Theres no connection back to the original local repo
3. Theres no way to copy or symlink untracked files (.env, build artifacts etc...)
I looked at existing worktree helpers and could not find anything that both
1. Let me create a branch + worktree and cd to the worktree in one command
2. Prune unused worktrees
3. Set what untracked files I wanted to "sync" and how
So I created my own
------
What does it do?
------
1. Introduces a `.worktree` file you can add to your project that defines:
1. Where to create worktrees
2. What files/folders to copy/symlink (e.g. `.env`)
3. What commands to run when you create a new worktree (`npm install`)
2. Create a branch + worktree + cd to the folder in one command `wt switch <branch-name>`3. Return to the root repo in one command `wt root`
4. Prune wt related to branches that no longer exist `wt prune --all`
----
Anyway, hope someone finds this useful, happy coding!