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

    Another useful property is that while jujutsu does have worktrees, like git, in many cases where one would use git worktrees (for example when writing accompanying documentation ) it is just easier to use another line of changes (what is a branch in git).

    Alas, that jujutsu does not store local change sets automatically on a remote git repo (this happens only when you update and push a git branch), means that still-mutable local changes are not automatically transferred to another computer you work on. And unpublished changes are naturally mutable in jujutsu. But you can safely copy a jj repo via rsync, as changes in jj metadata are thread-safe and atomic. The other way is of course to push a work-in-progress (“WIP”) git branch which can muate and is therefore not allowed to be merged by other people.

      • 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”.