zlacker

[parent] [thread] 11 comments
1. jhhh+(OP)[view] [source] 2025-12-05 16:32:14
Last time I saw this claimed (maybe from steve's tutorial?) it was just autosquash. Do you have another example?
replies(1): >>tcoff9+lC
2. tcoff9+lC[view] [source] 2025-12-05 19:16:37
>>jhhh+(OP)
https://ofcr.se/jujutsu-merge-workflow

With `jjui` this strategy takes only a few keystrokes to do operations like adding/removing parents from merge commits.

It's so nice to have like 4 parallel PRs in flight and then rebase all of them and all the other experimental branches you have on top onto main in 1 command.

Also, I cannot even stress to you how much first-class-conflicts is a game changer. Like seriously you do NOT understand how much better it is to not have to resolve conflicts immediately when rebasing and being able to come back and resolve them whenever you want. It cannot be overstated how much better this is than git.

Also, anonymous branches are SOOOO much better than git stashes.

replies(1): >>171862+271
◧◩
3. 171862+271[view] [source] [discussion] 2025-12-05 21:50:07
>>tcoff9+lC
> Also, anonymous branches are SOOOO much better than git stashes.

You can do anonymous branches in Git as well. I use both for different use cases.

replies(1): >>tcoff9+Ga1
◧◩◪
4. tcoff9+Ga1[view] [source] [discussion] 2025-12-05 22:13:10
>>171862+271
The UX around anonymous branches in git is not nearly as good as jj though.

Also git has no equivalent to the operation log. `jj undo` and `jj op restore` are so sweet.

replies(2): >>feelam+y62 >>171862+xQ2
◧◩◪◨
5. feelam+y62[view] [source] [discussion] 2025-12-06 08:34:02
>>tcoff9+Ga1
isnt jj undo the equivalent of git reflog (+ reset/checkout)?
replies(1): >>martin+mT2
◧◩◪◨
6. 171862+xQ2[view] [source] [discussion] 2025-12-06 16:24:49
>>tcoff9+Ga1
I can't comment on the UX of jj, but with git you literally just specify the commit, it doesn't feels tedious to me.

> Also git has no equivalent to the operation log.

For easy cases it's just git reset @{1}, but sure the oplog is a cool thing. I think it will be just added to git eventually, it can't be that hard.

replies(1): >>martin+uS2
◧◩◪◨⬒
7. martin+uS2[view] [source] [discussion] 2025-12-06 16:40:49
>>171862+xQ2
You can specify a commit, yes, but how do you remember your set of unnamed commits? Once HEAD no longer points to a commit, it will not show up in `git log`.

I agree that Git could gain an operation log. I haven't thought much about it but it feels like it could be done in a backwards-compatible way. It sounds like a ton of work, though, especially if it's going to be a transition from having the current ref storage be the source of truth to making the operation log the source of truth.

replies(1): >>171862+tV2
◧◩◪◨⬒
8. martin+mT2[view] [source] [discussion] 2025-12-06 16:47:08
>>feelam+y62
Mostly, yes. It also covers changes to the working copy (because jj automatically snapshots changes in the working copy). It's also much easier to use, especially when many refs were updated together. But, to be fair, it's kind of hard to update many refs at once with Git in the first place (there's `git rebase --update-refs` but not much else?), so undoing multiple ref-updates is not as relevant there.
◧◩◪◨⬒⬓
9. 171862+tV2[view] [source] [discussion] 2025-12-06 17:05:43
>>martin+uS2
The last one is always available via `git checkout -` and if you want to do more you can do `git checkout @{4}` etc. . It will also show up in `git log --reflog`. I honestly don't see the problem with naming things. Typing a chosen name is just so much more convenient than looking up the commit hash, even when you only need to type the unique prefix. When I don't want to think of a name yet, I just do "git tag a, b, c, ..."

I also tend to have the builtin GUI log equivalent (gitk) open. This has the behaviour, that no commit vanishes on refresh, even when it isn't on a branch anymore. To stop showing a commit you need to do a hard reload. This automatically puts the commit currently selected into the clipboard selection, so all you need to do is press Insert in the terminal.

> It sounds like a ton of work, though, especially if it's going to be a transition from having the current ref storage be the source of truth to making the operation log the source of truth.

I don't think that needs to be implemented like this. The only thing you need to do is recording the list of commands and program a resolver that outputs the inverse command of any given command.

replies(1): >>tcoff9+VX2
◧◩◪◨⬒⬓⬔
10. tcoff9+VX2[view] [source] [discussion] 2025-12-06 17:26:20
>>171862+tV2
Yeah but in jj every time you run ‘jj log’ you see all your anonymous branches and you can rebase all of them at once onto main in 1 command.

When I’m exploring a problem I end up with complex tree of many anonymous branches as I try different solutions to a problem and they all show up in my jj log and it’s so easy to refer to them by stable change ids. Often I’ll like part of a solution but not another part so I split a change into 2 commits and branch off the part I like and try something else for the other part. This way of working is not nearly as frictionless with git. A lot of times I do not even bother with editor undo unless it’s just a small amount of undoing because I have this workflow.

Git is to jj like asm is to C: you can do it all with git that you can do with jj but it’s all a lot easier in jj.

replies(1): >>171862+b13
◧◩◪◨⬒⬓⬔⧯
11. 171862+b13[view] [source] [discussion] 2025-12-06 17:51:44
>>tcoff9+VX2
I guess I never had complex trees from such an action, just a bunch of parallel branches, but I would say splitting and picking commits from different branches is not exactly hard with git either. Also you can also see them in git, but they won't have change ids of course.
replies(1): >>tcoff9+HD3
◧◩◪◨⬒⬓⬔⧯▣
12. tcoff9+HD3[view] [source] [discussion] 2025-12-06 23:24:30
>>171862+b13
I know how to do everything in git that I can do in jj but the thing is I would never bother doing most of these workflows with git because it’s way more of a pain in the ass than with jj. I work with version control in a totally different way now because how easy jj makes it to edit the graph.

Within a day of switching I was fully up to speed with jj and I never see myself going back. I use colocated repos so I can still use git tools in my editor for blaming and viewing file history.

Sure even rebasing a complex tree in git can be done by creating an octopus merge of all leaf nodes and rebasing with preserve merges but like that’s such a pain.

[go to top]