Re:Jujutsu Primer
by danpalmer on Friday November 20, 2026 @01:44AM
(#50570993)
I've been using JJ almost exclusively for over 2 years now. It's great, it works fantastically with our rather large monorepo at work.
However I mostly use it backing on to a custom VCS, not git. I can't wait to see some JJ-native forges that don't try to keep it compatible with git, I think there's a lot more benefits and more UX to be explored there!
Re:Jujutsu Primer
by ezst on Friday November 20, 2026 @02:08AM
(#50571150)
I doubt so, because not being compatible with the git repo format (and therefore requiring distinct hosting, therefore socially excluding from GitHub) is what slowly drove mercurial into obscurity, even though its UX was (and still is) superior to that of git (and JJ, which drew from it), not to mention the other aspects which made hg a much sounder choice on technical merits (e.g. very large monorepos), the users and decision makers both couldn't stand breaking away from the git repo format.
Re:Jujutsu Primer
by ezst on Friday November 20, 2026 @02:29AM
(#50571319)
Sure, but that was before the GitHub monopoly, the social/gamification of it, before the monoculture that ensued, and at a time when it was normal to cruise through the day using 2/3 distinct VCSes (being a FOSS contributor before 2010, you probably would use svn/git/hg/bzr on a daily basis and not need to RTFM for most routine commands like branching, checking in, merging and sharing a diff/series in one form or another).
Re:Jujutsu Primer
by danpalmer on Friday November 20, 2026 @02:22AM
(#50571277)
I agree that this was a factor in Mercurial dying, but I'm not sure this holds today. Mercurial performed significantly worse than git, that was a factor at the time, but in 2026 the perception is that git doesn't perform well enough (see GitHub outages, GitLab writing on this topic, Anthropic developing their own VCS, etc). Even small teams I know (circa 10 committers) are finding Git to not scale to the speed they're working at now.
JJ has the potential to be a substantial step forward in performance. This will depend on the backend to fully realise it, but a backend that prioritises scalability could vastly outperform git and GitHub's storage.
I think in the post-Microsoft acquisition, post-Dear GitHub letter era, GitHub's shine has worn off. I see a lot more use of GitLab for open source, a lot more use of various other forges. I don't think it's a requirement for a thriving open source project in the way it was for ~2010-2020.
Re:Jujutsu Primer
by danpalmer on Friday November 20, 2026 @04:55AM
(#50572453)
This is somewhat on purpose. For most people GitHub is most of their git experience. But even if it's not, GitHub represents the most mature attempt to scale git storage, and at this point it seems to be clear that it's not doing well at that, at this point it's likely that's not a git problem, but a GitHub problem. The fact that other large companies have migrated off git due to scalability issues is further evidence for that. Git's data model is just not designed for the scale of software engineering happening now.
Re:Jujutsu Primer
by ezst on Friday November 20, 2026 @03:57AM
(#50571994)
not to mention that many at mozilla cried over the loss of mercurial, with some mozillians part-time mercurial contributors rolling-up their sleeves and putting their weight behind jj as a "lesser evil" kind of compromise.
I originally thought to write "Git winning might be as simple as linux and github using it.", before I decided to shorten it:) Yes, I think that was a significant factor.
Re:Jujutsu Primer
by IshKebab on Friday November 20, 2026 @04:38AM
(#50572325)
Totally different situation IMO. Git and GitHub were not incumbents at the time. Mercurial mainly lost because it was overall worse than Git, ignoring network effects.
Re:Jujutsu Primer
by ezst on Friday November 20, 2026 @06:08AM
(#50573046)
You cannot decouple "VCS" (the component at the core of the project collaboration fabric) and "network effects". Too bad we don't have time machines: how many chose git over alternatives because "they've seen others doing it", without putting time and effort to weigh the pros and the cons? My observation is: a substantial amount.
Re:Jujutsu Primer
by jon-wood on Friday November 20, 2026 @06:25AM
(#50573187)
I'm not too bothered about the backing store but I really want to see some forges gain support for code review based on jj changes rather than git branches and commits. The Github model absolutely sucks if you're someone who likes to keep a coherent history because if you squash the resolution of PR comments into the parent commits nobody can see what changed between when the comments were made and now.
Basing code review on changes and changesets would mean that the evolution of each change could be seen in isolation, which would also mean that you immediately do away with awkward workarounds like PR stacks.
Re:Jujutsu Primer
by danpalmer on Friday November 20, 2026 @01:56AM
(#50571072)
I used to think this even just 6 months ago, but I no longer do. With the right prompting it's possible to get near-human results on commit chains. That said, I'm not suggesting you shouldn't review code, you absolutely should, it's just that I am fine letting agents manage the commits now.
Re:Jujutsu Primer
by danpalmer on Friday November 20, 2026 @01:51AM
(#50571041)
Yeah it took me a while to get agents comfortable with it. Mostly I had access to Gemini, and 2.x and early 3.x models struggled. By 3.7 it was much better, and with all the 4 models it's a complete non-issue. Separately I (and others) worked on improving our JJ skills and they're in a much better place now with some scripts that wrap up more complex operations (e.g. maintaining file copy/move markers).
This hasn't been an issue for me for a while now, and I've actually had Opus 5.5 and Gemini Hydrogen build and submit a 28 commit deep stack, with all the reviewing/rebasing/shifting around that entails.
Re:Jujutsu Primer
by p_l on Friday November 20, 2026 @02:05AM
(#50571129)
During late 3.x timeframe Google has been explicitly adding Jujutsu support across the agent stack in Antigravity, but it's not fully exposed unlike Git yet
Re:Jujutsu Primer
by danpalmer on Friday November 20, 2026 @02:17AM
(#50571233)
That's also true, the Antigravity harness may have been a contributing factor here. I use the internal Antigravity fork which uses JJ heavily because JJ is a core supported VCS interface for us.
Re:Jujutsu Primer
by danpalmer on Friday November 20, 2026 @04:53AM
(#50572436)
That tracks. I've not used JJ in public Antigravity, only in the internal fork, and that's not JJ for git, but JJ for Piper, so I don't know how much commonality there is.
Re:Jujutsu Primer
by ajkavanagh on Friday November 20, 2026 @02:18AM
(#50571237)
Recently JJ supports colocated workspace/worktrees so you get a .git directory in the workspace so git is happy. Also workmux has initial support for JJ colocated workspaces and sesh (tmux session handler) also has experimental support. Whilst there are still some sharp edges, none of them are around data integrity, and I'm using it every day. YMMV.
Re:Jujutsu Primer
by hdjrudni on Friday November 20, 2026 @02:32AM
(#50571348)
> I found it hard to get Claude and other agents to use it consistently and more effectively than git.
Write yourself a very good JJ skill or reference file from your AGENTS.md.
My LLMs struggled with it a lot too, but I slowly covered everything they were messing up and they haven't made a mistake in months now. Even when there are "divergent" issues, it knows how to recover now.
Re:Jujutsu Primer
by photios on Friday November 20, 2026 @02:37AM
(#50571374)
> I found it hard to get Claude and other agents to use it consistently and more effectively than git.
That was the biggest hurdle for me too. I was a 2+ year jj user, then I had to switch back to git because of all the agentic tools relying on it.
I recently went back to jj, after finding a decent skill [1] and discovering Emacs' majutsu plugin. Claude still tries to do a git command every once in a while, but it's a lot more bearable.
Re:Jujutsu Primer
by FranGro78 on Friday November 20, 2026 @03:06AM
(#50571577)
I use jj with open weight models and Claude Opus without much trouble, even without any explicit skill loaded for them - maybe they've made it into the training data? They seem to understand how the two differ conceptually and when told that the repo it is working in uses jj they stop using stash (or at least claim to).
I can say this hasn't always been the case, and until about 2 (maybe 3?) months ago I would handle all the VCS related parts of the work. I would let the agents write code, which I've found less and less necessary to tweak as time has gone on, and write the commit messages and create the PRs by hand.
My colleagues (who use git) let Claude write commit messages, but I find those awfully long-winded and my eyes just glaze over when I open their PRs - but to each their own I guess.
At least the Claude commit messages are an improvement over the commit messages before - I gave up trying to get them to apply the recommendations of how to write good commit messages given in https://cbea.ms/git-commit/
Re:Jujutsu Primer
by jon-wood on Friday November 20, 2026 @06:32AM
(#50573250)
Use hooks. Prompts are for guiding an agent towards a goal. If you want it to never, ever, do a thing then write some hooks that detect an attempt to use git and refuse the tool use. "Is the `git` executable in this command line" is entirely deterministic and doesn't require throwing an LLM running on 15 GPUs at the problem.
how does using something like this compare to just using a simple git-wrapper that does all the hard stuff for you (ala lazygit)?
Is jujutsu worth learning a whole new workflow for?
Re:Jujutsu Primer
by danpalmer on Friday November 20, 2026 @01:54AM
(#50571055)
In my experience, git has a few workflows that work well, and you can wrap them to improve the UX. JJ on the other hand is just designed better – there are many more workflows that will work well in it, and you can mix and match them more effectively, and because it's better designed there's less need for wrappers to simplify the UX because the fundamentals are simpler.
That said, I think JJ will get better when it's backing on to something that's designed from scratch rather than backing on to git and forges like Git(Hub|Lab) which really restrict it.
I used jujutsu regularly for a while (several months) about a year ago. My conclusion, in short, was that the improvement over my lazygit based setup was small enough that it wasn't worth the friction and small annoyances of jj. I'd still recommend trying it if you have the bandwidth for it, it just isn't a strong recommend of "this is undoubtedly better".
Longer version: if jj was what git had been originally, it would have saved millions of people a lot of pain and annoyance. It's definitely a better tool than git originally was. By now, though, git has gotten reasonably better, and the ecosystem around it has become polished enough, that the nicer, well-thought out UI of jj isn't as much of a slam dunk win anymore. It's still pretty good to work with, but there were enough papercuts for it to be not worth it for me: missing docs and features due to immaturity (presumably to a lesser degree by now than back then), the friction of bookmarks interacting with branches in remote git forges, the fact that every throwaway file is committed right away (theoretically optional, practically assumed by every jj workflow out there) so you need to both ignore it and prune it out of history every time, there being `jj <command>`s and `jj git <command>`s that you need to remember which is which - all of these have understandable reasons and are small things, but overall added up to the fact that I felt myself dreading the jj-specific issues more than I enjoyed the upsides of it.
Re:Jujutsu Primer
by pdpi on Friday November 20, 2026 @02:33AM
(#50571352)
JJ, using the squash workflow, is brilliant for working with Claude
The workflow is straightforward: I create a named revision for the work I want to do, then an unnamed revision on top. I prompt Claude, changes land in the unnamed revision, I review those, squash the parts that I'm ready to accept, prompt some more to iterate on the parts that aren't up to par yet. Rinse and repeat until the topmost (unnamed) revision is empty.
I instructed Claude that I use jj with the squash workflow, so it should never touch revisions with a non-empty description (I also needed to tell it to shut up about that check), and the whole thing flows pretty damn smoothly.
I just tell Claude to fold changes in their respective commits when working on a feature branch. No need to do rebase edits or anything else really. I don't really have to think of what gymnastics it has to do to get there.
Re:Jujutsu Primer
by zahrevsky on Friday November 20, 2026 @02:15AM
(#50571218)
What I miss is a guide on how a good commit history should look like, ideally focused on real-world examples.
There's lot's of jujutsu tutorials that teach you how to undo operations and write commit messages before the commit, but almost none cover what to do with all this power.
It's easy to name some general principles like “it should be easy to read” but I don't think it helps, especially if you're a novice like me.
Re:Jujutsu Primer
by jgtrosh on Friday November 20, 2026 @02:25AM
(#50571296)
Jujutsu tries to be nonprescriptibe about the end result, but my understanding of the megamerge strategy is that you want the powerful rebasing to help you manipulate many branches in parallel (fixes, features, etc), test them together, and end up with a linear history once accepted each is accepted.
This isn't a real world example though.
Re:Jujutsu Primer
by dwattttt on Friday November 20, 2026 @03:44AM
(#50571901)
In practice I end up producing a branch where the commits are the kind of "ideal"; units of work that build on each other, but not interspersed with "fix something we didn't in notice in the commit a week ago".
Re:Jujutsu Primer
by mhw on Friday November 20, 2026 @05:01AM
(#50572505)
The guide I usually point people at is https://mainmatter.com/blog/2021/05/26/keeping-a-clean-git-h... . It talks about git and the Fork GUI, which I find to be great for visualising what is going on in the repository, particularly for beginners who don't have a strong mental model of the commit graph.
Re:Jujutsu Primer
by jon-wood on Friday November 20, 2026 @06:30AM
(#50573230)
I think you're probably overthinking things. Split your changeset into a series of commits each of which encapsulates one step along the way to achieving the overall goal of your changeset.
As an example, you might end up with "Refactor to facilitate adding feature X", "Data models for X", "API endpoints for X", "UI for X". Each of those would contain all the code/tests/documentation for each of those steps.
The nice thing about jj is that it makes it really easy to have a bunch of messy commits locally as your bouncing around the place, followed by squashing/splitting things as appropriate. In practice that first refactor commit might only come into existence very late after you've built a bunch of endpoints and done some refactoring along the way.
Re:Jujutsu Primer
by LoganDark on Friday November 20, 2026 @04:24AM
(#50572218)
> Perhaps the value becomes clear on larger teams, big monorepos?
I find it incredibly useful as an individual contributor opening many PRs on a single upstream project. I can rebase all my PRs onto new upstream changes in one go, I can easily keep the commit graph neat, I can easily squash changes down into specific PRs while keeping my working tree positioned after they all merge together. Really speeds up my workflow, it's awesome. And it's really cool that merge conflicts don't block operations. It's really limiting that git has only one active branch at a time.
Re:Jujutsu Primer
by duggan on Friday November 20, 2026 @08:25AM
(#50574326)
Interesting! Thanks for the explainer, speed / concurrent development makes sense; that's one area I probably subconsciously steer away from due to the awkwardness.
Re:Jujutsu Primer
by skydhash on Friday November 20, 2026 @11:03AM
(#50576783)
>> I find it incredibly useful as an individual contributor opening many PRs on a single upstream project
> I probably subconsciously steer away from due to the awkwardness.
I think if I need to rebase a PR enough while waiting for merge that it's a coordination issue and maybe too much churn in the codebase. There shouldn't be a need to do so. Not sure I'd blame git for that.
Re:Jujutsu Primer
by LoganDark on Friday November 20, 2026 @11:20AM
(#50577089)
I have to be the one to rebase my PR or my signature will become invalid. The only valid way to merge my commits is via fast-forward.
(Do let me know if this has changed, but I've seen any other kind of merge result in the yellow "Unverified" status on GitHub, as I have the thing turned on that requires all commits from me to be signed with my own key.)
Re:Jujutsu Primer
by skydhash on Friday November 20, 2026 @12:04PM
(#50578001)
That's just the surface concern. Why is the review time so large that you have multiple PRs ongoing? Why is the codebase churning you have conflicting changes that aren't trivial?
Re:Jujutsu Primer
by rbehrends on Friday November 20, 2026 @07:08AM
(#50573602)
The single most compelling reason is probably `jj undo` and `jj redo`, with having a generally more consistent user interface and design being not far behind.
The rest is probably a bit more of a tradeoff for many people in that jj like git also has a non-traditional mental model that you have to learn, with the difference that there is actually rhyme and reason behind jj's. But whether learning that (which can be a non-trivial effort) is worth it to you if you're already accustomed to git idiosyncrasies is a personal decision.
Re:Jujutsu Primer
by ozim on Friday November 20, 2026 @02:54AM
(#50571488)
Have to say staging area is one feature that makes people better programmers. Especially using GUI tooling to pick hunks or discard parts you don’t want to go to a commit was always super useful for me.
I keep running into people who “just commit stuff” and they don’t know what they are doing.
Downside is we are heading into direction where people don’t even read code anymore so O might be just old man screaming at the clouds or agents.
Re:Jujutsu Primer
by KingMob on Friday November 20, 2026 @03:08AM
(#50571600)
Think of it this way: you still have a staging area in jj, but now it's a commit instead of something unique and separate. There's zero obstacle to picking and discarding hunks with jj.
Re:Jujutsu Primer
by nchmy on Friday November 20, 2026 @05:44AM
(#50572847)
Someone already said this, but you just use jj split. Either split the whole file or use interactive mode to split the exact lines. You could also use squash if you want to move it to an existing revision/commit.
It's vastly more efficient and ergonomic - no staging area to think about, remember, stumble over, etc.
It's all dead simple if you use jjui - don't even need to learn any jj syntax
Re:Jujutsu Primer
by BeetleB on Friday November 20, 2026 @10:26AM
(#50576044)
> Think of it this way: you still have a staging area in jj, but now it's a commit instead of something unique and separate.
Indeed. One nice thing about this is you can have a staging area for the staging area (repeat ad nauseum). It's not that unusual that I treat a commit as the staging area, and then I want to do something experimental on top of it, and make a new commit on top of my staging area and try things out there - ultimately to squash into my main staging commit.
In my last job I gave a presentation on jj and I hammered this point. I said it's like git but with everything version controlled. The index/staging is version controlled. The stash is version controlled. Technically even things like setting/unsetting bookmarks, commit descriptions etc are version controlled.
Re:Jujutsu Primer
by breppp on Friday November 20, 2026 @06:07AM
(#50573042)
In jj you create a new commit for the staged parts, you can name it "wip: foobariating", and then the gui tooling allows you to move files between both commits, for me it's the equivalent of a staging area/stash that you can name
Re:Jujutsu Primer
by coffeeindex on Friday November 20, 2026 @12:40PM
(#50578728)
> With the staging area, you don’t even know if the commit builds if you commit selectively, and manual adding is error-prone.
I get conceptually why it’s desired to have things build properly on every commit but I just haven’t seen people actually make use of that. In my team’s current code base, we have the commits in a given PR auto-squash down into one commit which I’ve liked quite a bit
Re:Jujutsu Primer
by dwattttt on Friday November 20, 2026 @03:54AM
(#50571973)
I have a good story around these features.
At the start of the day, I resumed working on a feature; there's no staging, so modifications I make are all stored as the current change.
Later that day I realised I needed to actually save the version of the feature that existed at the start of the morning.
So into the evolog I go (`jj evolog`). It's a record of all commits that a change has been; I could scroll back through the recorded changes, find the first change made that day, and then 'jj new' to create a change that represents that work.
It felt magical, to just be able to jump back to a project state that I didn't explicitly record, then save it.
Re:Jujutsu Primer
by thek3nger on Friday November 20, 2026 @06:58AM
(#50573512)
The evolog doesn’t track explicit commits. It is a list of snapshots of the codebase. JJ creates a new snapshot every time you run a command (or edit a file, depending on how you configure it).
Re:Jujutsu Primer
by BeetleB on Friday November 20, 2026 @10:28AM
(#50576107)
Yes, but without having to tell it to branch off.
One of the nice things about jj is you don't need to name a branch. You're just working on a graph. When you think you have something consistent and would like to give a name to it, you can do it (before or after the fact). But the lack of friction in creating a temporary new branch is amazing.
If you used VCS before git and loved how easy branching is in git, this is the same feeling in jj, but now with git being the old, tedious way.
Re:Jujutsu Primer
by skydhash on Friday November 20, 2026 @10:40AM
(#50576354)
> One of the nice things about jj is you don't need to name a branch.
Maybe it's due to different thinking process. But I can't think of doing a branch without knowing why I would need to do it, which also give me a quick indication of how I should name it. Everything is local anyway so I don't complicate stuff.
You see the description of changes in your log, and so that's often good enough as a name. No need to give it a second one. Here's an example from a project of mine:
It's nicer with color. Anyway, this is an anonymous branch, with two changes on it. "add running compiler image identity" and "harden running image identity fixtures" let me know what that branch is about, without needing to add an extra name onto the branch itself.
At first the auto-staging (or whatever it's called) is annoying. It sure is if one is used to dump random files in the repository, that haven't been ignored.
After some time, I realised it gives a lot of freedom. Working on something but not in a workspace, and need to do something else for the day? Just jump somewhere else. Everything will still be there when you get back.
In other words, it's hard to lose things by mistake. In those situations it's also cool to describe (name) the work being done, prior to making a normal commit.
A bit odd but one can also push `@` to a remote (e.g. iterating on something and piggy backing on a CI-system), avoiding having to squash and then push.
Having a stack of PR's, then rebasing it all to see a conflict, and only having to deal with it one is also magical.
Moving bookmarks around can be annoying.
Workspaces work fine, and there's two options:
- the normal ones, where a full .git isn't created. That works fine, unless having tooling that expects the workspace to also work as a git repository, in which case ..
- you can make the workspace collocated, less lightweight, but git tooling works
Jumping around has been the biggest thing to me. If I wanted to look at another branch real quick, I would've either done a worktree, another clone of the repo, or some bullshit commit like 'WIP' or something.
Re:Jujutsu Primer
by jon-wood on Friday November 20, 2026 @06:21AM
(#50573164)
As others have said, the head commit is effectively a staging area, it just contains everything that you've done which you can then split/squash/rebase as you see fit. `jj split -i` felt like magic the first time I used it.
Automatic bookmark naming is 100% cursed, I always name them, and also don't subscribe to this weird one commit per-bookmark/PR thing people seem to have adopted. You can use bookmarks just like git branches in practice.
Rebasing is so much nicer than doing the same thing with git because its going to do its best to finish the job, then leave you with a coherent set of conflicts you can clean up one commit at a time. Its still conflict resolution, and it still sucks, but at least you feel less like you're fighting the tooling.
Finally, workspaces exist and work reasonably well. Annoyingly Claude Code specifically has real trouble interacting with them, and last I tried in agent mode refused to accept that a jj workspace is just as valid a mechanism as a git workspace. They may have fixed that by now, its been a while since I tried.
Re:Jujutsu Primer
by BeetleB on Friday November 20, 2026 @10:22AM
(#50575983)
> I really don't like the automatic bookmark naming thing.
That's only when you're pushing, and you can always explicitly name it. I've never done an automatic bookmark.
> I'm also skeptical about automatic rebasing
Automatic rebasing is one of the best things about jj. I rely on it so much (just jump back to the commit with the bug and fix it right there) that I don't think I'd be happy with any version control system that doesn't have it.
Re:Jujutsu Primer
by Balinares on Friday November 20, 2026 @11:26AM
(#50577202)
Then imagine having as many staging areas as you want, stacked or in parallel branches or arbitrary combinations thereof with easy mechanisms to move chunks between them. That's Jujutsu.
Git feels like running with leaden shoes by contrast.
Re:Jujutsu Primer
by mono442 on Friday November 20, 2026 @02:55AM
(#50571499)
It seems like a good usability upgrade to git but a few years too late. I don't even remember how to use git anymore since the only thing I do manually is pushing to and pulling from the remote repo.
Re:Jujutsu Primer
by VMG on Friday November 20, 2026 @03:32AM
(#50571794)
The LLMs I use seem to handle it (I'm not sure about the token efficiency though). It could actually be more token efficient because I'm not rebasing as often.
Long-term I'm sure LLMs will have JJ in their training data.
Re:Jujutsu Primer
by pampa on Friday November 20, 2026 @04:34AM
(#50572294)
GLM-5.3 does seem to speak jj quite fluently and without consulting docs. Including complex codebase restructure and recovery of corrupted object storage.
Re:Jujutsu Primer
by mhw on Friday November 20, 2026 @04:57AM
(#50572471)
Codex seems to do pretty well with jj in my experience. I often use it to do things like resolving the conflicts in a rebased stack. The two main issues I found were having to remind it to use jj instead of git in a colocated repository, and it getting stuck when some commands open the interactive hunk selector or an editor.
I wrote a jj skill (https://github.com/mhw/jj-skill) that tries to address both of those issues, and explaining some higher-level workflows like the conflict resolution example I described above. It happily goes through the conflicts creating new commits off them, resolving the conflict, and then squashing the results.
Re:Jujutsu Primer
by nchmy on Friday November 20, 2026 @05:56AM
(#50572952)
I think all the models do pretty well with jj now. I just added instructions and a skill to make sure they always use jj rather than git commands.
Only gap that I care about is jj workspaces<->git worktrees is not fully implemented. You can now auto create a worktree when you create a workspace, but not the reverse. There's prs for this though. I hope they get merged soon.
Re:Jujutsu Primer
by pkuki on Friday November 20, 2026 @03:31AM
(#50571790)
Shameless plug, but a bit related to jj:)
I recently created a project which utilizes FUSE to serve git files directly from object store without a checkout. Main motivation was to sepeedup a worktrees creation (I work on a huge monorepo). In my case it helps a lot - now I wait a second instead of a minute.
But then I realised there are other interesting features which having vfs opened:
- tree structure of related branches (simplest case of that are stacked PRs) which rebases itself
- live preview of merge state or any node of such tree
- on demand creation of a new branch which merges any of the existing ones very cheaply (e.g for a throwaway build check)
- quick and simple comand which shows conflicting files between selected worktree and all others
- agents gets notified about such conflicts when they happen
I was able to design it in a way so git sees those virtual workspaces as normal worktrees, and all git commands works exactly as you would expect. So I think for some people, especially on the very big repositpries, it might solve a few problems they try to solve with jj.
Re:Jujutsu Primer
by pkuki on Friday November 20, 2026 @04:32AM
(#50572270)
FUSE isn't new, but GitFS, EdenFS and VFS for Git solve a different problem: lazy fetching from a server. A checkout is cheap until something reads it - e.g agent trying to run rg over the whole tree. That problem is solved in gitfold.
Also gitfold does not need or try to change any existing git behavior, and is fully compatible with existing git binaries without any modifications.
So while used technology is the same, approach is from completely different angle.
Re:Jujutsu Primer
by pkuki on Friday November 20, 2026 @04:31AM
(#50572264)
Ha, fair: ClearCase dynamic views were a filesystem too. The difference is that nothing is remote and git stays the source of truth. And it's a single binary that runs without root, tiny next to a behemoth like ClearCase.
Re:Jujutsu Primer
by nelaggy on Friday November 20, 2026 @04:04AM
(#50572034)
jj is great, we use it a lot and we've hijacked it to make a decision-management/context-management system [0]. it's also generally very useful for keeping commit history clean and the squash workflow is good for progressively iterating with ai-written code, since you can squash to preserve the good parts and get agents to build on that.
Re:Jujutsu Primer
by tkz1312 on Friday November 20, 2026 @05:05AM
(#50572542)
I'm fully onboard with the idea that git is horrible to learn and unfriendly for beginners, and also that jj is more convenient and a better UX. I do however struggle to find the point of it for me personally when I've suffered with git for long enough that it has become deeply familiar and very intuitive, and these days I mostly interact with it at a distance through a robot. I've yet to see anything which is for me personally compelling enough to make the effort to switch.
Re:Jujutsu Primer
by nchmy on Friday November 20, 2026 @05:53AM
(#50572922)
You are welcome to do whatever you like! But I do think that you're being unreasonable when you are deliberately using a less convenient tool, seemingly just for the sake of it.
jj just makes everything so much easier. But more than that, it has capabilities that are not available in git - eg how it deals with conflicts. There's tons of guides and essays out there about all of this so I won't try to enumerate all the differences
There would surely be some uncomfortable learning period, but it is worthwhile. jjui makes it that much easier too.
> these days I mostly interact with it at a distance through a robot.
Bad ergonomics-- terrible languages, clunky linters, complicated VCS-- can be offloaded to the clanker but the cost is still there. A clanker fighting to un-foobar a git repo is a clanker that spending tokens and coherence on not-the-thing-you-wanted.
Re:Jujutsu Primer
by sarthak-ag on Friday November 20, 2026 @08:01AM
(#50574108)
I wrote a piece on what specific advantages jj brings over git, and what kind of development workflows deserve it. Give it a read if you are debating internally whether jj deserves a place in your toolbox: https://sarthakag.bearblog.dev/from-git-to-jj-jujutsu/
Re:Jujutsu Primer
by boltzmann64 on Friday November 20, 2026 @08:56AM
(#50574721)
i really don't understand jj. what is the point of deleting the useful stage and treating the worktree as the project, which contains your debug harness, compiler artefacts, build files, and other things that you generally don't want in your project. you have to either write a .gitignore counterpart for jj or manually remove them before committing.
just treat your stage as the real project and worktree as some ephemeral sandbox. as you work build your index in stages by `git add -e` and removing your debug harness hunks. as soon as you reach a milestone, just commit and type your message when the context is fresh in your head.
with jj, you work all day and finally when you are ready to commit, you now have to manually remove your debug harness, remove build artefacts, and reverse engineer your own code to write a commit message when you just want to go home.
stop treating the stage as a implementation detail poking out into userspace. if it was just a implementation detail, linus wouldn't have defended it so fiercely.
Re:Jujutsu Primer
by mirashii on Friday November 20, 2026 @09:10AM
(#50574896)
Stage or no, git or jj, not writing a gitignore once and never worrying about removing hunks as you described or filtering the list of unstaged files in your brain for debug artifacts seems like completely unnecessary cognitive load. I’ve never come across a project that staunchly refuses to gitignore the paths of build artifacts that shouldn’t be checked in. It’s basic hygiene to prevent accidents. I really can’t understand any reason to oppose doing so.
Re:Jujutsu Primer
by boltzmann64 on Friday November 20, 2026 @10:38AM
(#50576322)
it only causes accident if you do git add --all. and my exact thesis is to be deliberate about what you commit.
`git add -e` your files as you are satisfied (of course after remove your debug harness). this way you debug harness stays put in your sandbox/worktree and no harness leaks into your project which remains pristine. this is something that .gitignore cannot do. jj cannot. you have remove all your harness, TODOs and others just to commit and then add it back again. that just means your version control failed.
and no, i am not advocating you should no add .gitignore.
Re:Jujutsu Primer
by mirashii on Friday November 20, 2026 @10:50AM
(#50576529)
> you have remove all your harness, TODOs and others just to commit and then add it back again
No, you don't. You can split. You can untrack. You can change your auto-track configuration. There are many ways to deal with this other than having to remove them. You can be equally deliberate about what goes into your final commit.
I set it to `snapshot.auto-track = "none()"` in the global config so that it is turned off by default and then selectively adjust it for a project.
You can also leave it as `none()` and then manually add files as before.
Note also that this has nothing to do with the staging area, but with selecting which files to add to a repo, which other VCSes can do just fine without having a staging area.
In fact, selective auto-track plus not having to explicitly stage changes makes it less of a risk that you forget to add something.
Re:Jujutsu Primer
by boltzmann64 on Friday November 20, 2026 @10:59AM
(#50576722)
i think forgetting to add something to stage is no worse than adding your debug to master/main because auto track added it. again, i appeal that please be deliberate about what you are adding. after all software engineering is a craft, so craft you commits.
Re:Jujutsu Primer
by rbehrends on Friday November 20, 2026 @11:52AM
(#50577756)
> i think forgetting to add something to stage is no worse than adding your debug to master/main because auto track added it.
I agree with that, which is why I pointed you at the auto-track setting. I also think that automatically adding everything is a poor default.
> after all software engineering is a craft, so craft you commits.
I could not disagree more. Reliability dictates that you minimize the risk of errors, including those from having unnecessary manual steps for frequently repeated operations.
My point here is especially git vs. pretty much any other VCS aside from jj, not git vs. jj; do not assume there are only two options here. Being explicit about adding files to a repo is generally a good idea. Having to repeat the process for already added files for every commit is just another opportunity for errors.
And as I wrote in another comment [1], I actually consider the staging area an anti-pattern for unrelated reasons.
jj makes it easier to craft good commits than git does. This is specifically because the index is just another commit. You cannot apply your slice and dice tools to the index in git, but you can with jj, since the index is a commit like any other.
Re:Jujutsu Primer
by bilkow on Friday November 20, 2026 @10:07AM
(#50575700)
I agree with you but I think that's more of a problem of the tutorials / docs out there than of the tool, which feel like they sell not reviewing your changes before committing as a selling point (that I disagree with). It seems like you just want what's usually called the "squash workflow"[0]. You create a new change on top `jj new`, when you want to "stage" changes, you can use move them to the parent commit by using `jj squash -i` to choose them interactively, or `jj squash path/to/file1 path/to/file2` to choose which files you want to move (similar to `git add`).
In practice I usually just use `jj commit -i`, where you just select the files you want to keep there, edit / add the description (commit message) and a new change is created on top for your new working area.
> compiler artefacts, build files
I agree with my sibling those should be .gitignored and if not, yes those those may cause problems with `jj`
> debug harness
I think that works pretty well with `jj` actually. Let's say mid work you're interrupted and needs to check a an commit. `abc` is your current working copy and `def` is the commit you want to checkout. You can leave your harness behind (`jj new def`), do whatever you need there, then come back (`jj edit abc`). You can also bring your harness with you with `jj rebase -s @ -o def`. If it's something you commonly use, you can create a change for it and keep it as a parent, and then use a filter to prevent changes starting with a prefix (let's say local:) from being pushed. That said, there are some rough edges about keeping changes as a parent IMO (like having to set up command aliases or keep having to move it, depending on your workflow).
Re:Jujutsu Primer
by boltzmann64 on Friday November 20, 2026 @10:48AM
(#50576489)
if you are mid work and suddenly need to checkout something you checkout in a new worktree so that all your context remains intact. `git worktree` has been in stable since 2015.
i have not used jj, but if you are introducing sqaush/new just you get what the stage does cleanly then you are implictly agreeing with the stage model.
Re:Jujutsu Primer
by skydhash on Friday November 20, 2026 @10:53AM
(#50576602)
> Let's say mid work you're interrupted and needs to check a an commit. `abc` is your current working copy and `def` is the commit you want to checkout. You can leave your harness behind (`jj new def`), do whatever you need there, then come back (`jj edit abc`). You can also bring your harness with you with `jj rebase -s @ -o def`.
It was not complicated with git either. If there was some important change that I didn't want to commit yet, I stash it. Same with experiments that contained valuable information. Then I can use stash apply whenever I want. Never had trouble jumping around the git graph.
One key thing is that I find that conflicts are a very good signal for when the intent of the worktree at commit c clashes with the intent of patch p. Especially if you've designed the code to follow the single responsibility principle. I don't want to sweep this under the rug. Instead I want to solve it right away.
A lot of jj advocates need to better highlight their workflows and why they think git was not doing well for them. I think there's too much focus on managing files instead of unit of changes (contained in patches).
Same as the index, the stash is also just a commit. It's not that it's impossible to do any of this in git, it's that it's more orthogonal in jj. Commits, the stash, and the index are three features in git, but a single feature in jj. This also means you can bring all of the tools to use on your psudeo-index and psuedo-stash that you use to work with commits.
Re:Jujutsu Primer
by skydhash on Friday November 20, 2026 @12:25PM
(#50578441)
My mental model is like this
commits: clean patches that have been integrated somehow (even as a draft version in my local repo)
index: patch in progress (very short lived as I usually add things and commit right after). It's an editing space.
stash: valuable patches in terms of knowledge, but not relevant to any current task
While they look similar, they have different purposes and so interact with different tools.
I code for one purpose (and maybe get distracted for one thing or two) then goes on to clean up the patches and write a proper message. It's not a matter of adding and rejecting hunks. I also do edit them normally. Tooling is not a problem as I spend more time on reading and editing than on tool calls.
Stashing is similar. The patches stored there are individuals, meaning I don't have to worry about dependency when I delete one. I also don't have to worry about location as there's just one stash concept.
You can also find a way to do the same operation in jj, but I want tooling centered around the concept of a patch, not the concept of commits. jj make it awkward to work with patches.
Re:Jujutsu Primer
by BeetleB on Friday November 20, 2026 @10:32AM
(#50576196)
> i really don't understand jj. what is the point of deleting the useful stage
You have a much more flexible stage in jj than in git. It's not gone anywhere. They just promoted it to first class and don't call it a stage.
> you have to either write a .gitignore counterpart for jj or manually remove them before committing.
I'll admit it is a pain. The one nice outcome, though, is that you now have everything in .gitignore and don't get "?" in your status.
> just commit and type your message when the context is fresh in your head.
The nice thing about jj is you don't need to worry about the "fresh in your head" part. You can write the commit message before you even begin, and modify it as you go along. You can commit things with no message (which I sort of use as staging), and much later, after several commits, go back and put in the message.
Jj with jjui is such a nice way to work. I can have a bunch of agents going in different workspaces and easily rebase work using a visual tool. A small skill to help AI work with workspaces over worktrees is all I needed to smooth the seams.
Re:Jujutsu Primer
by bel8 on Friday November 20, 2026 @09:48AM
(#50575398)
sadly jj doesn't have critical mass to "just work" like git does with LLMs.
I proposed it and the team rejected saying jj solves a problem that was solved by LLMs and git, and that it would introduce paper cuts to our workflow.
huh? I have no issues with Claude and JJ. Git can do all the same stuff, since it's git under the hood, but using JJ encourages Claude to rewrite the commits. Which is good for us cause review is our bottleneck.
Re:Jujutsu Primer
by Brajeshwar on Friday November 20, 2026 @10:23AM
(#50575995)
Someone here on HackerNews once advised me to just wing it and start using it. So, I started jj (Jujutsu) in small doses across my personal projects. I’m still at a super early stage, and my muscle memory is still stuck in Git.
Totally guilty to have used AI (Claude Code) entirely to make this learning tool for me, and hopefully for others. There may be errors, please feel free to correct and point out.
jj - taken through a small repository through 24 steps, drawn in 3D. Beside each step is the same step in Git.
Re:Jujutsu Primer
by fridder on Friday November 20, 2026 @10:46AM
(#50576467)
I really would like to move my workflow to jujutsu but I have repos that use git-lfs. This has been open for over 4 years at this point: https://github.com/jj-vcs/jj/issues/80
Re:Jujutsu Primer
by tripple6 on Friday November 20, 2026 @11:05AM
(#50576837)
Whatever (the) jj evangelists might say, I have yet to find a single use case (and I do mean a single one) where it has been useful to me. Any workflow they propose can easily be implemented with ordinary scripts. I understand that for "ordinary users" who can't tell Git's index apart from a remote repository, scripting that stuff is a pain. But I can't stop being surprised by the tenacity of people who fully understand that they could have implemented jj as an extension to Git itself, literally like git-jj extensions, yet chose to rewrite it from scratch and market it as a Git replacement. Well, a lot of time and effort has been spent in the wrong direction. But then again is that anything new in software engineering?
Also I’m sure there’s a joke in here about rollbacks.
However I mostly use it backing on to a custom VCS, not git. I can't wait to see some JJ-native forges that don't try to keep it compatible with git, I think there's a lot more benefits and more UX to be explored there!
JJ has the potential to be a substantial step forward in performance. This will depend on the backend to fully realise it, but a backend that prioritises scalability could vastly outperform git and GitHub's storage.
I think in the post-Microsoft acquisition, post-Dear GitHub letter era, GitHub's shine has worn off. I see a lot more use of GitLab for open source, a lot more use of various other forges. I don't think it's a requirement for a thriving open source project in the way it was for ~2010-2020.
Try `git init --bare --shared`. You'll never pay for GitHub again.
If Mercurial was better than Git it would have won the distributed versioning system war.
I remember Mozilla picking Hg instead of Git to migrate from CVS, and most people were unhappy about it because they prefered git.
People learnt git to use GitHub
At the time there were a couple of low-key Mercurial server solutions: bitbucket, and another I can' quite recall. And then there was Github.
At the time it very much felt like the HN/Silicon Valley hype-cycle/publicity bandwagon jumped on Github. That's really what won 'the war'.
It's a bit like saying, if betamax was better than VHS it would have one the video battles.
Back in the day, Windows was still 'king' and Mercurial was Windows friendly, and git really wasn't, and that still wasn't quite enough.
Ah, so Windows is better than Linux/UNIX and MacOS. Got it.
Basing code review on changes and changesets would mean that the evolution of each change could be seen in isolation, which would also mean that you immediately do away with awkward workarounds like PR stacks.
https://jjhub.dev/
(I am the author)
Git and jj work trees are not interoperable, so any tool that assumes git forces you back. Looking at you, Claude app…
This hasn't been an issue for me for a while now, and I've actually had Opus 5.5 and Gemini Hydrogen build and submit a 28 commit deep stack, with all the reviewing/rebasing/shifting around that entails.
It works totally fine.
Write yourself a very good JJ skill or reference file from your AGENTS.md.
My LLMs struggled with it a lot too, but I slowly covered everything they were messing up and they haven't made a mistake in months now. Even when there are "divergent" issues, it knows how to recover now.
That was the biggest hurdle for me too. I was a 2+ year jj user, then I had to switch back to git because of all the agentic tools relying on it.
I recently went back to jj, after finding a decent skill [1] and discovering Emacs' majutsu plugin. Claude still tries to do a git command every once in a while, but it's a lot more bearable.
[1] https://github.com/netresearch/jujutsu-workflow-skill/
I can say this hasn't always been the case, and until about 2 (maybe 3?) months ago I would handle all the VCS related parts of the work. I would let the agents write code, which I've found less and less necessary to tweak as time has gone on, and write the commit messages and create the PRs by hand.
My colleagues (who use git) let Claude write commit messages, but I find those awfully long-winded and my eyes just glaze over when I open their PRs - but to each their own I guess.
At least the Claude commit messages are an improvement over the commit messages before - I gave up trying to get them to apply the recommendations of how to write good commit messages given in https://cbea.ms/git-commit/
It's a tad opinionated: my agents are not allowed to push to external repos — but that's easy to change if you need
That said, I think JJ will get better when it's backing on to something that's designed from scratch rather than backing on to git and forges like Git(Hub|Lab) which really restrict it.
Longer version: if jj was what git had been originally, it would have saved millions of people a lot of pain and annoyance. It's definitely a better tool than git originally was. By now, though, git has gotten reasonably better, and the ecosystem around it has become polished enough, that the nicer, well-thought out UI of jj isn't as much of a slam dunk win anymore. It's still pretty good to work with, but there were enough papercuts for it to be not worth it for me: missing docs and features due to immaturity (presumably to a lesser degree by now than back then), the friction of bookmarks interacting with branches in remote git forges, the fact that every throwaway file is committed right away (theoretically optional, practically assumed by every jj workflow out there) so you need to both ignore it and prune it out of history every time, there being `jj <command>`s and `jj git <command>`s that you need to remember which is which - all of these have understandable reasons and are small things, but overall added up to the fact that I felt myself dreading the jj-specific issues more than I enjoyed the upsides of it.
The workflow is straightforward: I create a named revision for the work I want to do, then an unnamed revision on top. I prompt Claude, changes land in the unnamed revision, I review those, squash the parts that I'm ready to accept, prompt some more to iterate on the parts that aren't up to par yet. Rinse and repeat until the topmost (unnamed) revision is empty.
I instructed Claude that I use jj with the squash workflow, so it should never touch revisions with a non-empty description (I also needed to tell it to shut up about that check), and the whole thing flows pretty damn smoothly.
There's lot's of jujutsu tutorials that teach you how to undo operations and write commit messages before the commit, but almost none cover what to do with all this power.
It's easy to name some general principles like “it should be easy to read” but I don't think it helps, especially if you're a novice like me.
jj gives you excellent tools to change your mind mid-way.
As an example, you might end up with "Refactor to facilitate adding feature X", "Data models for X", "API endpoints for X", "UI for X". Each of those would contain all the code/tests/documentation for each of those steps.
The nice thing about jj is that it makes it really easy to have a bunch of messy commits locally as your bouncing around the place, followed by squashing/splitting things as appropriate. In practice that first refactor commit might only come into existence very late after you've built a bunch of endpoints and done some refactoring along the way.
Clearly other people are delighted with jj though.
Perhaps the value becomes clear on larger teams, big monorepos?
I find it incredibly useful as an individual contributor opening many PRs on a single upstream project. I can rebase all my PRs onto new upstream changes in one go, I can easily keep the commit graph neat, I can easily squash changes down into specific PRs while keeping my working tree positioned after they all merge together. Really speeds up my workflow, it's awesome. And it's really cool that merge conflicts don't block operations. It's really limiting that git has only one active branch at a time.
> I probably subconsciously steer away from due to the awkwardness.
I think if I need to rebase a PR enough while waiting for merge that it's a coordination issue and maybe too much churn in the codebase. There shouldn't be a need to do so. Not sure I'd blame git for that.
(Do let me know if this has changed, but I've seen any other kind of merge result in the yellow "Unverified" status on GitHub, as I have the thing turned on that requires all commits from me to be signed with my own key.)
- e.g. tracks everything by default; this is an advantage compared to "oops I forgot to check it in".
- e.g. reworking feature branches is more natural in jj compared to rebasing in git.
I expect I've just internalized all these idiosyncrasies after so long.
The rest is probably a bit more of a tradeoff for many people in that jj like git also has a non-traditional mental model that you have to learn, with the difference that there is actually rhyme and reason behind jj's. But whether learning that (which can be a non-trivial effort) is worth it to you if you're already accustomed to git idiosyncrasies is a personal decision.
I really don't like the automatic bookmark naming thing.
I'm also skeptical about automatic rebasing, but having conflicts not block the process could be nice, I'll have to try it out on more complex trees.
Also, I didn't see a section on workspaces, but I assume they basically do the right thing.
I keep running into people who “just commit stuff” and they don’t know what they are doing.
Downside is we are heading into direction where people don’t even read code anymore so O might be just old man screaming at the clouds or agents.
1. I write some code.
2. I realise it makes sense to commit as two commits.
3. I stage changes for the first commit & commit it.
4. I stage the remaining changes and commit those.
How would that work in JJ? I guess you do things in a different order somehow?
It's vastly more efficient and ergonomic - no staging area to think about, remember, stumble over, etc.
It's all dead simple if you use jjui - don't even need to learn any jj syntax
* working tree == in progress
* staging area == finished
How do can I split modifications to a single file into multiple commits? (In git)
Indeed. One nice thing about this is you can have a staging area for the staging area (repeat ad nauseum). It's not that unusual that I treat a commit as the staging area, and then I want to do something experimental on top of it, and make a new commit on top of my staging area and try things out there - ultimately to squash into my main staging commit.
In my last job I gave a presentation on jj and I hammered this point. I said it's like git but with everything version controlled. The index/staging is version controlled. The stash is version controlled. Technically even things like setting/unsetting bookmarks, commit descriptions etc are version controlled.
With the staging area, you don't even know if the commit builds if you commit selectively, and manual adding is error-prone.
The traditional "clean" way has been to stash unwanted changes temporarily, then commit the rest.
I get conceptually why it’s desired to have things build properly on every commit but I just haven’t seen people actually make use of that. In my team’s current code base, we have the commits in a given PR auto-squash down into one commit which I’ve liked quite a bit
I'd be OK if I had to immediately (blocking any operations) choose whether to add or (locally) ignore the file, but auto-add isn't for me.
Or edit the commit if you just want to make a quick fix you know you'll want to squash immediately.
At the start of the day, I resumed working on a feature; there's no staging, so modifications I make are all stored as the current change.
Later that day I realised I needed to actually save the version of the feature that existed at the start of the morning.
So into the evolog I go (`jj evolog`). It's a record of all commits that a change has been; I could scroll back through the recorded changes, find the first change made that day, and then 'jj new' to create a change that represents that work.
It felt magical, to just be able to jump back to a project state that I didn't explicitly record, then save it.
One of the nice things about jj is you don't need to name a branch. You're just working on a graph. When you think you have something consistent and would like to give a name to it, you can do it (before or after the fact). But the lack of friction in creating a temporary new branch is amazing.
If you used VCS before git and loved how easy branching is in git, this is the same feeling in jj, but now with git being the old, tedious way.
Maybe it's due to different thinking process. But I can't think of doing a branch without knowing why I would need to do it, which also give me a quick indication of how I should name it. Everything is local anyway so I don't complicate stuff.
At first the auto-staging (or whatever it's called) is annoying. It sure is if one is used to dump random files in the repository, that haven't been ignored.
After some time, I realised it gives a lot of freedom. Working on something but not in a workspace, and need to do something else for the day? Just jump somewhere else. Everything will still be there when you get back. In other words, it's hard to lose things by mistake. In those situations it's also cool to describe (name) the work being done, prior to making a normal commit. A bit odd but one can also push `@` to a remote (e.g. iterating on something and piggy backing on a CI-system), avoiding having to squash and then push.
Having a stack of PR's, then rebasing it all to see a conflict, and only having to deal with it one is also magical.
Moving bookmarks around can be annoying.
Workspaces work fine, and there's two options:
- the normal ones, where a full .git isn't created. That works fine, unless having tooling that expects the workspace to also work as a git repository, in which case ..
- you can make the workspace collocated, less lightweight, but git tooling works
JJ lets you freely move through the history.
Automatic bookmark naming is 100% cursed, I always name them, and also don't subscribe to this weird one commit per-bookmark/PR thing people seem to have adopted. You can use bookmarks just like git branches in practice.
Rebasing is so much nicer than doing the same thing with git because its going to do its best to finish the job, then leave you with a coherent set of conflicts you can clean up one commit at a time. Its still conflict resolution, and it still sucks, but at least you feel less like you're fighting the tooling.
Finally, workspaces exist and work reasonably well. Annoyingly Claude Code specifically has real trouble interacting with them, and last I tried in agent mode refused to accept that a jj workspace is just as valid a mechanism as a git workspace. They may have fixed that by now, its been a while since I tried.
That's only when you're pushing, and you can always explicitly name it. I've never done an automatic bookmark.
> I'm also skeptical about automatic rebasing
Automatic rebasing is one of the best things about jj. I rely on it so much (just jump back to the commit with the bug and fix it right there) that I don't think I'd be happy with any version control system that doesn't have it.
Git feels like running with leaden shoes by contrast.
But I still miss the number commit references from mercurial...
Long-term I'm sure LLMs will have JJ in their training data.
edit: there is! https://tabbyml.github.io/jj-benchmark/
I wrote a jj skill (https://github.com/mhw/jj-skill) that tries to address both of those issues, and explaining some higher-level workflows like the conflict resolution example I described above. It happily goes through the conflicts creating new commits off them, resolving the conflict, and then squashing the results.
Only gap that I care about is jj workspaces<->git worktrees is not fully implemented. You can now auto create a worktree when you create a workspace, but not the reverse. There's prs for this though. I hope they get merged soon.
Claude is also very good at fixing merge conflicts as well.
I recently created a project which utilizes FUSE to serve git files directly from object store without a checkout. Main motivation was to sepeedup a worktrees creation (I work on a huge monorepo). In my case it helps a lot - now I wait a second instead of a minute. But then I realised there are other interesting features which having vfs opened:
- tree structure of related branches (simplest case of that are stacked PRs) which rebases itself
- live preview of merge state or any node of such tree
- on demand creation of a new branch which merges any of the existing ones very cheaply (e.g for a throwaway build check)
- quick and simple comand which shows conflicting files between selected worktree and all others
- agents gets notified about such conflicts when they happen
I was able to design it in a way so git sees those virtual workspaces as normal worktrees, and all git commands works exactly as you would expect. So I think for some people, especially on the very big repositpries, it might solve a few problems they try to solve with jj.
https://github.com/pkukielka/gitfold
A few typical use cases: https://github.com/pkukielka/gitfold/blob/main/docs/guide.md
this for some reason gives me clearcase vibes...shudder.
I think in truth I 50% of the reason I made it was because I was mad about Anthropic inventing a whole new vcs after blaming git clone speed. I also knew artifact-fs exists, which works lazily to get data on demand, which is cool. https://github.com/cloudflare/artifact-fs https://news.ycombinator.com/item?id=47792374
[0]: https://github.com/edawise/deccy-cli
jj just makes everything so much easier. But more than that, it has capabilities that are not available in git - eg how it deals with conflicts. There's tons of guides and essays out there about all of this so I won't try to enumerate all the differences
There would surely be some uncomfortable learning period, but it is worthwhile. jjui makes it that much easier too.
Bad ergonomics-- terrible languages, clunky linters, complicated VCS-- can be offloaded to the clanker but the cost is still there. A clanker fighting to un-foobar a git repo is a clanker that spending tokens and coherence on not-the-thing-you-wanted.
just treat your stage as the real project and worktree as some ephemeral sandbox. as you work build your index in stages by `git add -e` and removing your debug harness hunks. as soon as you reach a milestone, just commit and type your message when the context is fresh in your head.
with jj, you work all day and finally when you are ready to commit, you now have to manually remove your debug harness, remove build artefacts, and reverse engineer your own code to write a commit message when you just want to go home.
stop treating the stage as a implementation detail poking out into userspace. if it was just a implementation detail, linus wouldn't have defended it so fiercely.
`git add -e` your files as you are satisfied (of course after remove your debug harness). this way you debug harness stays put in your sandbox/worktree and no harness leaks into your project which remains pristine. this is something that .gitignore cannot do. jj cannot. you have remove all your harness, TODOs and others just to commit and then add it back again. that just means your version control failed.
and no, i am not advocating you should no add .gitignore.
No, you don't. You can split. You can untrack. You can change your auto-track configuration. There are many ways to deal with this other than having to remove them. You can be equally deliberate about what goes into your final commit.
You can also leave it as `none()` and then manually add files as before.
Note also that this has nothing to do with the staging area, but with selecting which files to add to a repo, which other VCSes can do just fine without having a staging area.
In fact, selective auto-track plus not having to explicitly stage changes makes it less of a risk that you forget to add something.
I agree with that, which is why I pointed you at the auto-track setting. I also think that automatically adding everything is a poor default.
> after all software engineering is a craft, so craft you commits.
I could not disagree more. Reliability dictates that you minimize the risk of errors, including those from having unnecessary manual steps for frequently repeated operations.
My point here is especially git vs. pretty much any other VCS aside from jj, not git vs. jj; do not assume there are only two options here. Being explicit about adding files to a repo is generally a good idea. Having to repeat the process for already added files for every commit is just another opportunity for errors.
And as I wrote in another comment [1], I actually consider the staging area an anti-pattern for unrelated reasons.
[1] https://news.ycombinator.com/item?id=50573492
In practice I usually just use `jj commit -i`, where you just select the files you want to keep there, edit / add the description (commit message) and a new change is created on top for your new working area.
> compiler artefacts, build files
I agree with my sibling those should be .gitignored and if not, yes those those may cause problems with `jj`
> debug harness
I think that works pretty well with `jj` actually. Let's say mid work you're interrupted and needs to check a an commit. `abc` is your current working copy and `def` is the commit you want to checkout. You can leave your harness behind (`jj new def`), do whatever you need there, then come back (`jj edit abc`). You can also bring your harness with you with `jj rebase -s @ -o def`. If it's something you commonly use, you can create a change for it and keep it as a parent, and then use a filter to prevent changes starting with a prefix (let's say local:) from being pushed. That said, there are some rough edges about keeping changes as a parent IMO (like having to set up command aliases or keep having to move it, depending on your workflow).
[0] https://steveklabnik.github.io/jujutsu-tutorial/real-world-w...
i have not used jj, but if you are introducing sqaush/new just you get what the stage does cleanly then you are implictly agreeing with the stage model.
It was not complicated with git either. If there was some important change that I didn't want to commit yet, I stash it. Same with experiments that contained valuable information. Then I can use stash apply whenever I want. Never had trouble jumping around the git graph.
One key thing is that I find that conflicts are a very good signal for when the intent of the worktree at commit c clashes with the intent of patch p. Especially if you've designed the code to follow the single responsibility principle. I don't want to sweep this under the rug. Instead I want to solve it right away.
A lot of jj advocates need to better highlight their workflows and why they think git was not doing well for them. I think there's too much focus on managing files instead of unit of changes (contained in patches).
commits: clean patches that have been integrated somehow (even as a draft version in my local repo)
index: patch in progress (very short lived as I usually add things and commit right after). It's an editing space.
stash: valuable patches in terms of knowledge, but not relevant to any current task
While they look similar, they have different purposes and so interact with different tools.
I code for one purpose (and maybe get distracted for one thing or two) then goes on to clean up the patches and write a proper message. It's not a matter of adding and rejecting hunks. I also do edit them normally. Tooling is not a problem as I spend more time on reading and editing than on tool calls.
Stashing is similar. The patches stored there are individuals, meaning I don't have to worry about dependency when I delete one. I also don't have to worry about location as there's just one stash concept.
You can also find a way to do the same operation in jj, but I want tooling centered around the concept of a patch, not the concept of commits. jj make it awkward to work with patches.
You have a much more flexible stage in jj than in git. It's not gone anywhere. They just promoted it to first class and don't call it a stage.
> you have to either write a .gitignore counterpart for jj or manually remove them before committing.
I'll admit it is a pain. The one nice outcome, though, is that you now have everything in .gitignore and don't get "?" in your status.
> just commit and type your message when the context is fresh in your head.
The nice thing about jj is you don't need to worry about the "fresh in your head" part. You can write the commit message before you even begin, and modify it as you go along. You can commit things with no message (which I sort of use as staging), and much later, after several commits, go back and put in the message.
I just really with they would add :q as a quit option. Vi has given me brain damage.
I proposed it and the team rejected saying jj solves a problem that was solved by LLMs and git, and that it would introduce paper cuts to our workflow.
By default it ignores jj for me and just uses git. The team wasn't eager to add more to the context.
Totally guilty to have used AI (Claude Code) entirely to make this learning tool for me, and hopefully for others. There may be errors, please feel free to correct and point out.
jj - taken through a small repository through 24 steps, drawn in 3D. Beside each step is the same step in Git.
https://brajeshwar.com/misc/jj/