Hacker News Viewer

Jujutsu worktrees are convenient (2024)

by nvader on 12/3/2025, 11:26:51 PM

https://shaddy.dev/notes/jj-worktrees/

Comments

by: wolfwyrd

Phil Haack has a neat script called tree-me[0] that takes a lot of the pain out of this in vanilla Git<p>[0] <a href="https:&#x2F;&#x2F;haacked.com&#x2F;archive&#x2F;2025&#x2F;11&#x2F;21&#x2F;tree-me&#x2F;" rel="nofollow">https:&#x2F;&#x2F;haacked.com&#x2F;archive&#x2F;2025&#x2F;11&#x2F;21&#x2F;tree-me&#x2F;</a>

12/8/2025, 11:19:24 AM


by: rafaelmn

So how is this different from git worktrees exactly ?

12/8/2025, 10:15:09 AM


by: janquo

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

12/8/2025, 12:20:18 PM


by: amluto

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.

12/8/2025, 11:40:39 AM


by: akabalanza

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.<p>I&#x27;m following this Jujutsu project, I&#x27;m genuinely curious to see what it can bring to the SVC scene.

12/8/2025, 10:01:28 AM


by: Zambyte

I&#x27;m glad they found a workflow that works for them, but<p>&gt; 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.<p>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&#x27;s a difference in the editor that I use (GNU Emacs) that makes this more natural?

12/8/2025, 10:15:05 AM


by: michaelbuckbee

The usage of worktrees is seeing a big comeback in the era of AI assisted coding.<p>I have a script that takes Github issues and spins them out into their own worktrees with corresponding stack.<p>I can then run individual instances of Claude Code in each and easily flip between them.

12/8/2025, 11:00:21 AM


by: mentalgear

Re Worktree&#x2F;Spaces alternative: Why not just open up a new editor window ?<p>&gt; 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.

12/8/2025, 10:44:37 AM


by: jandudulski

`jj workspace add ..&#x2F;project-name-2` vs `git worktree add ..&#x2F;project-name-2`<p>Sorry, but I don&#x27;t get the improvement.

12/8/2025, 11:34:33 AM


by: spider-mario

&gt; I’ve been using Jujutsu(jj for short) as my defactor git cli frontend for a while now.<p>“de facto” please.

12/8/2025, 10:11:23 AM


by: tonyhart7

I like jujutsu kaisen too

12/8/2025, 12:01:50 PM