“Jujutsu (jj) is a version control system with a significantly simplified mental model and command-line interface compared to Git, without sacrificing expressibility or power (in fact, you could argue Jujutsu is more powerful). Stacked-diff workflows, seamless rebases, and ephemeral revisions are all natural with jj […]”

Part 2 of the series is out and is here.

  • atzanteol@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    6 days ago

    However, editing past commits and reorganizing the tree is MUCH easier in jj. It feels like the commands are more in line with what I want to do rather than having to figure out the specific set of git commands to do what I want.

    I can see that - but that’s a “less frequent” task than me switching between branches. And the auto-commit-everything mixed with “you need to lookup a hash ID for each thing you’re working on” workflow is very frequent and obnoxious.

    • naonintendois@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      5 days ago

      You don’t always need the hash id. @ is equivalent to HEAD, there’s also @- for HEAD~, @-- for HEAD~2, etc. with jj log the revset can also be a complex expression https://jj-vcs.github.io/jj/latest/revsets/. You can also create a bookmark to track a remote git branch that’s also updated when you fetch. But you have to move the bookmark when you make changes locally.

    • HaraldvonBlauzahn@feddit.orgOP
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      edit-2
      6 days ago

      I can see that - but that’s a “less frequent” task than me switching between branches.

      My observation is that one happens to edit the commit graph much more often because it is so effortless.

      And the analogous thing to switching a branch is:

      jj
      

      to get the log. And then, with say “qx” being the abbreviated commit id I want to append the next change to:

      jj new qx
      

      and now I am already working at the right series of changes.

      Because I like a lot to focus on one single thing, the next thing I do is often

       jj desc
      

      which opens $EDITOR with the commit description and lets me write down what I am going to add or change.

      That commit description also shows up in the log command, so I know always what the change is about.