logoalt Hacker News

nixpulvis • today at 7:28 AM • 6 replies • view on HN

I'm skeptical about the no staging area, but it seems just like a HEAD commit replaces that, which could be nice.

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.


Replies

ozim • today at 7:54 AM

Have to say staging area is one feature that makes people better programmers. Especially using GUI tooling to pick hunks or discard parts you don’t want to go to a commit was always super useful for me. (CLI of staging hunks is not convenient at all for me)

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 I might be just old man screaming at the clouds or agents.

➕ show 6 replies
jon-wood • today at 11:21 AM

As others have said, the head commit is effectively a staging area, it just contains everything that you've done which you can then split/squash/rebase as you see fit. `jj split -i` felt like magic the first time I used it.

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.

adamtulinius • today at 9:16 AM

I've used jujutsu for maybe half a year by now.

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

dwattttt • today at 8:54 AM

I have a good story around these features.

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 when I started work that 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.

➕ show 1 reply
eloisant • today at 8:34 AM

Yes you can create an empty commit on the top of your branch, it works like a staging area.

Or edit the commit if you just want to make a quick fix you know you'll want to squash immediately.

silon42 • today at 8:12 AM

I don't mind auto commits too much, but auto adding files really doesn't work for me.

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.

➕ show 1 reply