News for hackers. Stuff that matters.
Re:Jujutsu for Busy Devs by 1718627440 on Tuesday July 22, 2025 @05:29AM (#44644858)
You can absolutely do that in git:

    git checkout master
    git rebase [whatever]
    [rebasing stuff]
    git tag rebasing
    git checkout --detach master
    [do random other stuff]
    git tag todo
    git checkout rebasing
    [continue rebasing]
When you are not trying to modify the same branch you're rebasing, you can omit --detach and also git tag todo.

(To clarify, it has never occurred to me that I even want to do that, so I didn't knew how to do it. Yet I didn't even needed to consider a manual, it just follows naturally from the git user model even if it seams completely unidiomatic.)

Re:Jujutsu for Busy Devs by sunshowers on Tuesday July 22, 2025 @01:12PM (#44650200)
As far as I know you can't start another rebase -i while you're in this situation. But it's been almost two years since I last used rebase -i so I might be wrong.
Re:Jujutsu for Busy Devs by 1718627440 on Wednesday July 23, 2025 @05:05AM (#44657114)
Yes, that's because a rebase in git is nothing special, so you influence the rebase with normal git commands. When you do normal interaction like committing or resetting these become part of the rebase.
Re:Jujutsu for Busy Devs by BeetleB on Tuesday July 22, 2025 @08:07PM (#44654382)
I know you're trying to point out how easy it is in git, and some months ago I would have agreed. But after using jj (for only a few weeks!), your commands seem needlessly complex.

In jj, you run the rebase command. If you get conflicts, and want to switch to something else before you fix all of them, you simply do "jj edit" or "jj new" and work on something else. Then you do "jj edit" to go back to the conflicted revision and get back to fixing conflicts.

The key point is: You don't need to learn any new concepts.

In the git example above, I need to know tagging. I need to know checkout vs "checkout --detach", etc.

I'm not saying your git commands are crazy complex. They're merely more complex than one needs to solve this particular problem.

Re:Jujutsu for Busy Devs by 1718627440 on Wednesday July 23, 2025 @05:00AM (#44657082)
You don't need to tag, you also just specify the commit SHA, isn't that the same in jj? It's just convenience.

The difference here seams to be that in jj you're always in a commit while in git you're always outside. But that's the difference between one and two commands.

Tags are hardly a new concept, if anything they are easier then a rebase. You can't really expect to use something with knowing the core concepts. Thats true for every tool and also for software. Can you use jj without knowing what a commit is?

I didn't knew about --detach before. It was obvious from the error and easily found using autocomplete. Also you only need it, if you want to change something under yourself while you're already modifying it.