logoalt Hacker News

Jujutsu Worktrees Are Convenient

59 pointsby nvaderlast Wednesday at 11:26 PM33 commentsview on HN

Comments

janquotoday at 12:20 PM

It's not really usable to me as the workspace folder doesn't have .git in it, even though original repo is collocated and hence the git tools don't work there. I am forced to use git work trees with separate collocated JJ repo each.

show 1 reply
wolfwyrdtoday at 11:19 AM

Phil Haack has a neat script called tree-me[0] that takes a lot of the pain out of this in vanilla Git

[0] https://haacked.com/archive/2025/11/21/tree-me/

rafaelmntoday at 10:15 AM

So how is this different from git worktrees exactly ?

show 2 replies
amlutotoday at 11:40 AM

I want a variant of this where I make a worktree that has no ability to push anywhere including its parent. Instead the parent worktree pulls from it automatically. That way I can run some sandboxed workflow that might arbitrarily corrupt the work tree, possibly overwriting everything in it and symlinked from it, without losing data.

show 2 replies
akabalanzatoday at 10:01 AM

I consider git the best software ever written. I used to work with some other SVCs, and I cannot thinking on leaving git now. Somehow, I feel it like a limitation for my mind.

I'm following this Jujutsu project, I'm genuinely curious to see what it can bring to the SVC scene.

show 4 replies
Zambytetoday at 10:15 AM

I'm glad they found a workflow that works for them, but

> but for some reason I cannot proceed on it while eg the CI is running, but I also don’t want to leave the commit and close my code editor etc. It would be simple to just stash everything and later pop the stash, but it still feels disruptive.

I have been using jj as my git client for 2 years now (wow), and I have never considered this to be disruptive. I just immediately switch to a new commit where I want to go, rather than making a new workspace to work in. Maybe it's a difference in the editor that I use (GNU Emacs) that makes this more natural?

show 2 replies
mentalgeartoday at 10:44 AM

Re Worktree/Spaces alternative: Why not just open up a new editor window ?

> I usually use it when I’ve got one task I’m working on, but for some reason I cannot proceed on it while eg the CI is running, but I also don’t want to leave the commit and close my code editor etc. It would be simple to just stash everything and later pop the stash, but it still feels disruptive.

show 1 reply
michaelbuckbeetoday at 11:00 AM

The usage of worktrees is seeing a big comeback in the era of AI assisted coding.

I have a script that takes Github issues and spins them out into their own worktrees with corresponding stack.

I can then run individual instances of Claude Code in each and easily flip between them.

show 1 reply
jandudulskitoday at 11:34 AM

`jj workspace add ../project-name-2` vs `git worktree add ../project-name-2`

Sorry, but I don't get the improvement.

show 2 replies
spider-mariotoday at 10:11 AM

> I’ve been using Jujutsu(jj for short) as my defactor git cli frontend for a while now.

“de facto” please.

show 1 reply
tonyhart7today at 12:01 PM

I like jujutsu kaisen too