Like? This isn't explained, I'm curious on why I would want to use it, but this is just an empty platitude, doesn't really give me a reason to try.
Like? This isn't explained, I'm curious on why I would want to use it, but this is just an empty platitude, doesn't really give me a reason to try.
You can do all that in Git, but I sure as hell never did; and my co-workers really appreciate PRs that are broken into lots of little commits that can be easily looked over, one by one.
A lot of the jj strategies in this thread are a bit more cowboy, and I’m surprised.
With `jj new` + `jj squash`[2], you're collecting work that you can review as a separate thing anytime as you go along. You don't have to remember anything. If you throw in an unrelated change, you'll notice it if you review the changes before squashing them, so you can split it out then. And I'm pretty much always working in this state even when I'm at the top of my branch, so `jj new some-deep-node` doesn't really change anything. If I get called away and have no memory of what I was doing when I return, it doesn't matter: my jj state tells me exactly where things are and what I was doing.
[1] Which is not a huge problem, you have deferred conflict resolution so if something goes wrong you can probably just repair it with normal editing or your editor's undo functionality.
[2] I don't usually bother with `jj new -A`, since I'm going to squash my "out of line" temporary commit into the linear chain anyway. `jj new -A` is more similar to `jj edit` than `jj new` -- it shares some but not all of the modal disadvantages. So perhaps my answer to your actual question is: "yeah, I dunno either."
1. Your working copy contains whatever mish-mash of changes you want.
2. When you’re ready to stage and commit these changes, run `jj commit --tool gitpatch`
3. The iterative “stage this hunk?” UI from git lets you choose what to commit.
4. Your editor opens for a commit message.
5. The changes you selected are now in a new parent commit of your working copy, and the remaining changes are left in the working copy commit.
In addition to the _same_ workflow, jj makes it easier to have other workflows as well (you may be interested in the megamerge workflow if you’re always working on multiple tasks at once).
[1]: https://zerowidth.com/2025/jj-tips-and-tricks/#hunk-wise-sty...
Pretty easy. While inaccurate, it's useful to think of jj as two separate repositories. One is the "clean" one that has everything nice and neat. The other is a repository of all your (very) incremental changes.
You have to actively decide what goes in the "clean" one. jj automatically puts stuff in the messy one. Any time you actively commit something, you're committing to the clean one. So you decide what goes in there.
When you do a push, only the "clean" commits are pushed.
#1: Squashing
Create a revision for the feature, then create another revision atop that.
$ jj new main -m 'feature'
$ jj new
$ jj
@ trtpzvno samfredrickson@gmail.com 2025-09-01 12:32:33 9ac76a0f
│ (empty) (no description set)
○ wvzltyyr samfredrickson@gmail.com 2025-09-01 12:32:31 80b2d5d0
│ (empty) feature
◆ zxrulorx samfredrickson@gmail.com 2024-12-11 03:44:38 main 351a2b30
│ all the stuff
$ vim
$ jj
@ trtpzvno samfredrickson@gmail.com 2025-09-01 12:34:50 5516c2b9
│ (no description set)
○ wvzltyyr samfredrickson@gmail.com 2025-09-01 12:32:31 80b2d5d0
│ (empty) feature
◆ zxrulorx samfredrickson@gmail.com 2024-12-11 03:44:38 main 351a2b30
│ all the stuff
~
$ jj squash -i
# interactively choose hunks to squash into parent
$ jj
@ oxqnumku samfredrickson@gmail.com 2025-09-01 12:35:48 8694aa34
│ (empty) (no description set)
○ wvzltyyr samfredrickson@gmail.com 2025-09-01 12:35:48 47110bff
│ feature
◆ zxrulorx samfredrickson@gmail.com 2024-12-11 03:44:38 main 351a2b30
│ all the stuff
~
#2: SplittingCreate a revision for the feature, then split it up retroactively.
$ jj new main -m 'feature'
$ jj
@ snomlyny samfredrickson@gmail.com 2025-09-01 12:38:39 84c6ecaa
│ (empty) feature
◆ zxrulorx samfredrickson@gmail.com 2024-12-11 03:44:38 main 351a2b30
│ all the stuff
~
$ vim
$ jj
@ snomlyny samfredrickson@gmail.com 2025-09-01 12:39:51 8038bdd4
│ feature
◆ zxrulorx samfredrickson@gmail.com 2024-12-11 03:44:38 main 351a2b30
│ all the stuff
~
$ jj split
# interactively choose hunks to keep, splitting the rest into a new revision
$ jj
@ zpnpvvzl samfredrickson@gmail.com 2025-09-01 12:41:47 5656f1c5
│ debugging junk
○ snomlyny samfredrickson@gmail.com 2025-09-01 12:41:44 1d17740b
│ feature
◆ zxrulorx samfredrickson@gmail.com 2024-12-11 03:44:38 main 351a2b30
│ all the stuff
~