zlacker

[parent] [thread] 5 comments
1. 171862+(OP)[view] [source] 2025-12-06 16:24:49
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+X1
2. martin+X1[view] [source] 2025-12-06 16:40:49
>>171862+(OP)
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+W4
◧◩
3. 171862+W4[view] [source] [discussion] 2025-12-06 17:05:43
>>martin+X1
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+o7
◧◩◪
4. tcoff9+o7[view] [source] [discussion] 2025-12-06 17:26:20
>>171862+W4
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+Ea
◧◩◪◨
5. 171862+Ea[view] [source] [discussion] 2025-12-06 17:51:44
>>tcoff9+o7
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+aN
◧◩◪◨⬒
6. tcoff9+aN[view] [source] [discussion] 2025-12-06 23:24:30
>>171862+Ea
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]