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

      One difference between using worktrees and branches in git is that in git you usually have uncommited stuff that’s not finished, and worktrees are a way to avoid committing this. And you want to avoid committing early because it is hard to clean-up later. This hesistsnce to commit is not necessary at all in jujutsu - any change to the source files is already captured and will be restored once you go back to that changeset. There are other cases where you use worktrees in git e.g. to isolate a build and an hour-long integration test running it in parallel to your ongoing work, and in thar cases, you’d use workspaces in jujutsu like you’d in git.

      but then we would need to talk about what about the git model people have trouble with, why

      Too many commands that do subtly and irreversivly things on the repo, with potentially messed-up interim states, only to do the conceptually much simpler task to edit and manipulate the directed acyclic graph of commits.

      In short, jujutsu is a commit graph editor and does the same with perhaps 10% of the complexity of git. The man pages on the git reset, branch and merge commands are already larger than the whole - and detailed!- documentation of jujutsu.

      Steve Klabnik explains this much better than I can here in his blog that I posted.

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

          I have to admit that in spite of having used git for about 20 years, I never used reflog. And even with magit I did stuff like rebase rarely. I found it costing too much time to read the man pages again every time and meditate what would happen with “reset xyz”.