←back to thread

Jujutsu for everyone

(jj-for-everyone.github.io)
434 points Bogdanp | 8 comments | | HN request time: 0.001s | source | bottom
Show context
idoubtit ◴[] No.45085587[source]
I've now seen a dozen of articles that explain that jj is wonderful and better than Git for everything. This tutorial is of the same kind. Now that I've read extensively about the good part, I'd be more interested by the bad and the ugly. Because my experience with jj was more balanced.

When I tried jj, I found a few pain points that made me return to Git. For instance, I was sharing a branch with a co-worker where we were just piling commits as soon as they were ready (after `pull --rebase` if necessary). Since jj doesn't have names branches, that workflow was easy with git and tedious with jj – even with the `tug` alias. The process in the "Tracking remote bookmarks" chapter of this tutorial still doesn't look nice to me.

Another pain point was that jj could not colocate with light clones, like `git clone --filter=blob:none`. Maybe that's fixed now.

replies(7): >>45085702 #>>45085823 #>>45085842 #>>45085897 #>>45086038 #>>45089721 #>>45095158 #
1. shepherdjerred ◴[] No.45085842[source]
One thing that has bitten me a few times is jj randomly losing my changes. As in, I'll be working in Cursor, not run any mutating jj command (maybe I'll run jj status or jj log, but nothing else), and later on my changes are gone from my repository (often times with a message about a stale workspace).

I'm not sure if this is somehow related to my IDE, working in a huge monorepo, or something else, but it has been quite painful.

Aside from that, though, I do really like the flexibility jj provides.

replies(3): >>45086378 #>>45087511 #>>45087664 #
2. Filligree ◴[] No.45086378[source]
That's surprising. I have no real insight, but... was that a colocated repo? Is there any chance Cursor was creating/modifying the Git commits?
replies(1): >>45088110 #
3. steveklabnik ◴[] No.45087511[source]
My best guess: something (likely cursor) is running git commands that mutate the repo behind your back. I don’t use cursor so I can’t say for sure, though.
4. gcr ◴[] No.45087664[source]
Your changes are almost certainly in the op log, even as just bare snapshot operations. Have you been able to search that and recover them?

(i've found jj undo quite robust, i'd be surprised if you ever actually lost work tbh)

replies(1): >>45088113 #
5. shepherdjerred ◴[] No.45088110[source]
Yeah, it was a colocated repo. I've been using Cursor, but this also happened with VS Code at least once. I don't think that either tool should be doing anything with Git aside from maybe running git fetch.
replies(1): >>45091928 #
6. shepherdjerred ◴[] No.45088113[source]
If this happened with Git I feel confident enough to recover my work. I'm not familiar enough with jj, so usually when this happens I've used VS Code's timeline feature to recover my work.
replies(1): >>45089847 #
7. raylu ◴[] No.45089847{3}[source]
`jj op` has `log` to show you the op log, `show`/`diff` which work like their non-op versions, and `jj op restore` which is sorta like `git reset --hard HEAD@{whatever}` but for your whole repo state
8. p_l ◴[] No.45091928{3}[source]
In both cases you might have had a plugin that worked on Git - I think one is even part of default VS Code install (at least I don't recall having to install it)