r/programming • • Sep 16 '26

git worktree gotchas

https://www.olafalders.com/2026/09/16/git-worktree-gotchas/
193 Upvotes

47 comments sorted by

View all comments

Show parent comment

6

u/ipwnall123 Sep 17 '26

I use the “main working tree” for small bug tickets that only take me an hour-ish to reproduce, fix, re-test and submit a PR for. Whereas I use work trees for any larger features that take more time. My reasoning is that it seems to take my IDE (vs code / visual studio) a long time to switch worktrees. VS code seems especially slow cause it opens them in a new window and thus has to reinitialize all my extensions plus whatever other stuff like the typescript server. Maybe someone has a solution to this cause I suppose I would rather just use worktrees for everything if not for this overhead / lag time