Jujutsu Worktrees Are Convenient

(shaddy.dev)

38 points | by nvader 4 days ago

8 comments

  • wolfwyrd
    18 minutes ago
    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/

  • rafaelmn
    1 hour ago
    So how is this different from git worktrees exactly ?
    • rk06
      59 minutes ago
      there is no difference as jj is only a frontend to git.

      author me tions that git cli require multiple steps when there are unstaged changes.

      I don't know if git has one liner cli command for it as i myself use gitextn to create worktrees

      • dubi_steinkek
        38 minutes ago
        > there is no difference as jj is only a frontend to git.

        That's not really true in this case, as the worktree feature from jujutsu is not implemented on top of git worktrees.

  • michaelbuckbee
    37 minutes ago
    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.

  • jandudulski
    3 minutes ago
    `jj workspace add ../project-name-2` vs `git worktree add ../project-name-2`

    Sorry, but I don't get the improvement.

  • Zambyte
    1 hour ago
    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?

    • rafaelmn
      1 hour ago
      Build cache, packages and a few of other things get messed up when switching branches - if you need to do a "quick bug-fix and get back into the main thing" worktrees are really nice.
    • arccy
      37 minutes ago
      if you don't do much in terms of accumulating open buffer/window sets, editor open at the specific line you were working on etc, then you'll feel it less.

      or things like just keeping the terminal history consistent with a change if you look at things like compile command outputs etc.

  • akabalanza
    1 hour ago
    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.

    • DarkNova6
      1 hour ago
      > I consider git the best software ever written.

      How so? I worked with Git all my professional life and I can't deny its efficacy. However, I would not call it un-improvable given all types of corner case issues I have had with it over the years.

      • akabalanza
        46 minutes ago
        Maybe "best ever" is too bold, but both proven efficacy and mainstream popularity for over 15 years, without being a bulky thing everybody just accept (like vscode), I don't see many other software examples.

        Anyway, sorry for triggering you with the first bold statement! I actually wanted to emphasize the curiosity over jj.

    • skrebbel
      1 hour ago
      No software that has 3 names for the same thing (git stash —cached vs —keep-index wtf‽) deserves to be described as “the best ever written”
    • Hammershaft
      59 minutes ago
      I think Git is incredible version control hiding behind a terrible interface.
  • mentalgear
    53 minutes ago
    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.

    • arccy
      42 minutes ago
      your editor works on files on disk. worktrees / workspaces are what manage those files on disk in relation to your git repo.
  • spider-mario
    1 hour ago
    > I’ve been using Jujutsu(jj for short) as my defactor git cli frontend for a while now.

    “de facto” please.