#@tiburon-tech out of curiosity what's
1 messages · Page 1 of 1 (latest)
True unrestricted parallelism can be achieved only with git worktrees, as it gives you a lightweight clone with its own named object with a full git staging area. A new "playspace" with its own state, the doesn't interfere with your current tree state, so you don't need to context switch your traditional single git repo context.
The agent can then work in its own space, and make all sorts of changes, and commits all it wants, and it won't affect your code at all.
You can then choose to merge those changes into your main git context if you choose, or discard it.
It's a lot like how working async with github or gitlab on a feature branch allows for humans to do parallel work, but git worktrees give you a similar concept locally.
Before agents it was useful if you wanted to peek maybe at someone else's code without having to stash your changes and switch your git context, but in this new AI coding agent world, it's very useful for running multiple agents in parallel without fear of race conditions and context poisoning as they mutate state on the same objects.
I posted this a little earlier with an example in a thread:
https://discord.com/channels/1027685395649015980/1452801338076299358
thanks
lol i just tried out worktrees
I don’t see any project files in this worktree (only the git pointer), so I can’t inspect an existing preview setup.
it can't see the project
What model said that?
And this is one of the downsides of git worktrees in general, as one must ensure that you don't have essential uncommitted or gitignored context for the task you are giving to the model.
I heard a tip from some AI podcast to try to have a re-hydration script and maybe a custom workflow for each project that you wish to make heavy use of the git worktree feature.
For now, it's definitely quite beta feeling inside of Windsurf, and some of these nuances of git worktree life aren't abstracted away smoothly in the interface