How to work with worktrees?

I’m trying to get used to a new Cursor3 UI and my goal is to use worktrees in Cursor.
Can you share how you organize your work with worktrees in Cursor?

  • How do you manage .env and other uncommitted files? AFAIK there’s no setup script option for new worktrees
  • Does Cursor cleanup worktree after I archive the chat?
  • Any best practices making agent aware of worktree environment? For example they always try to use same dev server on port 3000

Any other tips?

Hey @Ingvar!

To grab the first two questions you asked:

There is! Read about it here.

Not directly after archival (you might want to go join this thread) but there is a cleanup mechanism.