I keep running into people who “just commit stuff” and they don’t know what they are doing.
Downside is we are heading into direction where people don’t even read code anymore so O might be just old man screaming at the clouds or agents.
1. I write some code.
2. I realise it makes sense to commit as two commits.
3. I stage changes for the first commit & commit it.
4. I stage the remaining changes and commit those.
How would that work in JJ? I guess you do things in a different order somehow?
It's vastly more efficient and ergonomic - no staging area to think about, remember, stumble over, etc.
It's all dead simple if you use jjui - don't even need to learn any jj syntax
* working tree == in progress
* staging area == finished
How do can I split modifications to a single file into multiple commits? (In git)
Indeed. One nice thing about this is you can have a staging area for the staging area (repeat ad nauseum). It's not that unusual that I treat a commit as the staging area, and then I want to do something experimental on top of it, and make a new commit on top of my staging area and try things out there - ultimately to squash into my main staging commit.
In my last job I gave a presentation on jj and I hammered this point. I said it's like git but with everything version controlled. The index/staging is version controlled. The stash is version controlled. Technically even things like setting/unsetting bookmarks, commit descriptions etc are version controlled.
git commit foo bar/
To commit my changes to foo and bar/* but not baz. Also pairs well with -p.With the staging area, you don't even know if the commit builds if you commit selectively, and manual adding is error-prone.
The traditional "clean" way has been to stash unwanted changes temporarily, then commit the rest.
I get conceptually why it’s desired to have things build properly on every commit but I just haven’t seen people actually make use of that. In my team’s current code base, we have the commits in a given PR auto-squash down into one commit which I’ve liked quite a bit
I'd be OK if I had to immediately (blocking any operations) choose whether to add or (locally) ignore the file, but auto-add isn't for me.
jj config set --user snapshot.auto-track "none()"Or edit the commit if you just want to make a quick fix you know you'll want to squash immediately.
At the start of the day, I resumed working on a feature; there's no staging, so modifications I make are all stored as the current change.
Later that day I realised I needed to actually save the version of the feature that existed at the start of the morning.
So into the evolog I go (`jj evolog`). It's a record of all commits that a change has been; I could scroll back through the recorded changes, find the first change made that day, and then 'jj new' to create a change that represents that work.
It felt magical, to just be able to jump back to a project state that I didn't explicitly record, then save it.
One of the nice things about jj is you don't need to name a branch. You're just working on a graph. When you think you have something consistent and would like to give a name to it, you can do it (before or after the fact). But the lack of friction in creating a temporary new branch is amazing.
If you used VCS before git and loved how easy branching is in git, this is the same feeling in jj, but now with git being the old, tedious way.
Maybe it's due to different thinking process. But I can't think of doing a branch without knowing why I would need to do it, which also give me a quick indication of how I should name it. Everything is local anyway so I don't complicate stuff.
│ ○ lrvwrmqv [email protected] 2026-09-07 22:13:12 977b1ab7
│ │ harden running image identity fixtures
│ ○ vqmsmkup [email protected] 2026-09-07 22:13:12 bcd98591
├─╯ add running compiler image identity
◆ mxvotmyz [email protected] 2026-09-07 21:53:55 trunk e37a132e
│ satisfy the byte recovery Clippy gate
It's nicer with color. Anyway, this is an anonymous branch, with two changes on it. "add running compiler image identity" and "harden running image identity fixtures" let me know what that branch is about, without needing to add an extra name onto the branch itself.https://news.ycombinator.com/item?id=50577902
But the relevant bit to this is the following
I want tooling centered around the concept of a patch, not the concept of commits.
Commits for me are settled patches. I don't go around editing commits that much (and I have the tooling to make it trivial). Because for me, the patch inside has served it purpose. When I found a new purpose for it, the context has already been changed, so even when it saved me a bit of typing, I had to look at it anew.So only the few commits around my current tasks are in flux. There's not a lot, so rebasing is very easy, even with the git cli. Same with editing a span of commits. It becomes the workspace and thus can easily be modified. Everything else is just on hold. That's why I like named branch. Because I look at it holistically instead of individual commits.
Maybe your workflow is different, and you are always doing surgical treatment to a complicated tree. But I never needed to do so. These days I'm even leaning towards a single patch for a feature or a fix. Way easier for communication.
EDIT
reply slowed down by HN moderation.
So it's the "oh no, I realise now that I needed to commit before I made all those changes" situation, but since the workspace gets snapshot/committed on every jj command, nothing was lost.
At first the auto-staging (or whatever it's called) is annoying. It sure is if one is used to dump random files in the repository, that haven't been ignored.
After some time, I realised it gives a lot of freedom. Working on something but not in a workspace, and need to do something else for the day? Just jump somewhere else. Everything will still be there when you get back. In other words, it's hard to lose things by mistake. In those situations it's also cool to describe (name) the work being done, prior to making a normal commit. A bit odd but one can also push `@` to a remote (e.g. iterating on something and piggy backing on a CI-system), avoiding having to squash and then push.
Having a stack of PR's, then rebasing it all to see a conflict, and only having to deal with it one is also magical.
Moving bookmarks around can be annoying.
Workspaces work fine, and there's two options:
- the normal ones, where a full .git isn't created. That works fine, unless having tooling that expects the workspace to also work as a git repository, in which case ..
- you can make the workspace collocated, less lightweight, but git tooling works
JJ lets you freely move through the history.
Automatic bookmark naming is 100% cursed, I always name them, and also don't subscribe to this weird one commit per-bookmark/PR thing people seem to have adopted. You can use bookmarks just like git branches in practice.
Rebasing is so much nicer than doing the same thing with git because its going to do its best to finish the job, then leave you with a coherent set of conflicts you can clean up one commit at a time. Its still conflict resolution, and it still sucks, but at least you feel less like you're fighting the tooling.
Finally, workspaces exist and work reasonably well. Annoyingly Claude Code specifically has real trouble interacting with them, and last I tried in agent mode refused to accept that a jj workspace is just as valid a mechanism as a git workspace. They may have fixed that by now, its been a while since I tried.
That's only when you're pushing, and you can always explicitly name it. I've never done an automatic bookmark.
> I'm also skeptical about automatic rebasing
Automatic rebasing is one of the best things about jj. I rely on it so much (just jump back to the commit with the bug and fix it right there) that I don't think I'd be happy with any version control system that doesn't have it.
Does jj have something like git rerere?
Git feels like running with leaden shoes by contrast.
I really don't like the automatic bookmark naming thing.
I'm also skeptical about automatic rebasing, but having conflicts not block the process could be nice, I'll have to try it out on more complex trees.
Also, I didn't see a section on workspaces, but I assume they basically do the right thing.