3 ms·
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
by shepherdjerred 1y ago
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.
- Filligree 1y agoThat's surprising. I have no real insight, but... was that a colocated repo? Is there any chance Cursor was creating/modifying the Git commits?
- shepherdjerred 1y agoYeah, 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.
- p_l 1y agoIn 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)
- steveklabnik 1y agoMy 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.
- gcr 1y agoYour 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)
- shepherdjerred 1y agoIf 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.
- raylu 1y ago`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