3 ms·
One struggle I've had when working with worktrees is not a problem with the worktrees themselves but instead how my Intellij manages project configurations. I c
by esposito 1mo ago
One struggle I've had when working with worktrees is not a problem with the worktrees themselves but instead how my Intellij manages project configurations. I can't for the life of me get it set up so my configuration can sit relative to multiple worktrees. There's probably a plugin which solves the issue, but at least in my experience the .idea config folder is rooted in its current directory and very difficult to migrate to another folder or worktree. I end up having to re-establish project linting rules, run configurations, what have you, for each new worktree and it becomes too much of a hassle for anything short-lived.
- sa46 1mo agoIntelliJ added worktree “support” but it’s really just a way to create a new project. I suspect it’ll take a while before we see a shared configuration across worktrees because the .idea folder contains mutable state. https://www.jetbrains.com/help/idea/use-git-worktrees.html https://www.jetbrains.com/help/idea/use-git-worktrees.html
- Klaster_1 1mo agoI had a related issue in VSCode - my project definition is stored in the main checkout and is git ignored. When I WT the repo and open an instance of VSCode for it, no project is attached to it, breaking the dev env (scripts, settings, etc.). What worked for me was a VSCode WT extension that allows you to run arbitrary hooks before and after WT checkout. In checkout one, I symlink the VSCode project. This solves the issue and as a bonus, and project changes propagate between all open instances. The only drawback is that VSCode chats/extensions are path scoped, so you lose conversation history and per project extension on/off state that's stored in the VSCode global DB.