I dont understand the need for this at all. I use the git. Inside one CC session on average there will be 80-160 commits. I can revert back whatever I want whenever I want. Whenever context gets hairy I clear and ask CC to review specific commits to continue or whatever. I must be missing something here completely what is the need for jj at all…
IME, the benefit is ease of branching paths. For example, if I'm working on a feature I can do something like this:
- Put tests in one commit
- Tell Claude to come up with several approaches where I'm not exactly sure what the best might be
- Put approach 1 into a commit, 2 into a separate one, etc. These approach commits all live side by side instead of stacked on top of each other.
- At any point I can create a new commit that is the combination of approach 1 along with the tests and iterate from there
- When doing that, I can absorb any changes made into the appropriate commit.
Possibilities kinda open up from there. Maybe intead of fully separate approaches, you just want to break the change into parallel pieces (e.g. you're not sure all of your changes will be needed as requirements change). Then I can create a "super" commit that's the combination of all the other commits even though they're not stacked. That means I can conditionally choose which commits I want to include into my "super" commit too.
I don't see the correlation. Jujutsu has workspaces as the match to git's worktrees too because their worktrees are a different thing from what I'm talking about. Switching worktrees and making commits is way more work than just making commits.
Lack of staging in jj is a hard pass from me. I usually have a dozen different things I’m working on, and I commit piecemeal whenever one gets across the finish line. How do you do this in jj?