News for hackers. Stuff that matters.
Re:What is jj and why should I care? by VMG on Tuesday April 14, 2026 @08:15AM (#47764610)
... unless you actually want to edit a change!
Re:What is jj and why should I care? by throawayonthe on Tuesday April 14, 2026 @08:19AM (#47764655)
well, you can do jj new <revision>, make your edit, and then do jj squash which will add the changes to the prev revision

i do this for example when i want to see a specific edit highlighted in my editor, it's a nice workflow i think

Re:What is jj and why should I care? by Aeolun on Tuesday April 14, 2026 @08:39AM (#47764891)
This is exactly how someone explained Git to me 12 years ago or so, and I’ve finally wrapped my head around it. Not changing now.
Re:What is jj and why should I care? by hacker161 on Tuesday April 14, 2026 @11:08AM (#47766631)
It took you 12 years to grok git?? Embarrassing.
Re:What is jj and why should I care? by mh- on Tuesday April 14, 2026 @12:42PM (#47767968)
If I'm understanding the thread correctly, I have a git alias to `git commit --amend --no-edit`, for exactly this workflow. When I'm hacking on something locally and want to just keep amending a commit. I only ever do this if it's HEAD though.
Re:What is jj and why should I care? by steveklabnik on Tuesday April 14, 2026 @01:39PM (#47768705)
Yes, one way to think about jj in a sort of low-level way is that every jj command does the equivalent of that, every time.

(You can also set up watchman and have that happen on every file change...)

Re:What is jj and why should I care? by arccy on Tuesday April 14, 2026 @08:20AM (#47764662)
still use new, and then squash your changes in. that way you can actually see what changes you made
Re:What is jj and why should I care? by incognito124 on Tuesday April 14, 2026 @08:24AM (#47764702)
then you `new` & `squash` :)
Re:What is jj and why should I care? by BeetleB on Tuesday April 14, 2026 @09:47AM (#47765628)
I go back and forth between the two approaches, but because of the whole "accidentally made some temporary changes and now it's a pain to separate/undo them because not all changes were temporary", I also usually do a jj new and then jj squash.