I’ve started using Jujutsu recently and was surprised at how low friction it was to switch. If you’re like the author and keep hearing about it without giving it a shot, I suggest you just sit down and try it – it’s a lot less effort than you might expect.
I really like all the concepts and have only heard good things, so I tried it but wasn't able to figure out how to use it as effectively as I can use Git. Specifically, I use VS Code and do a lot of stuff with the IDE's builtin support for selecting specific parts of files to stage, and I was hoping to be able to do something similar for jj split. I asked the Jujutsu Kaizen devs on Discord and they said that isn't currently implemented. They did also mention that VisualJJ might have more what I want, but I'm reluctant to switch to JJ only to have to rely on a closed-source tool.
Are there others who've previously made heavy use of VS Code's builtin Git staging support and have successfully migrated to JJ? Anything I'm missing?
One of my favorite features of jj is file watching. Once set up, jj will snapshot the repo on every filesystem event. This means on every file save, you get a git commit! It provides arbitrarily fine-grained commit history, and works across all tools (not just your IDE). I set it up in the config and it has "just worked" ever since.
The result is that `jj evolog -p` will show detailed history of your actions. But all but the most recent commit are hidden, so neatly tucked away behind the same change as usual.
Another favorite is git no longer yelling at me and having meltdowns about switching branches - "files would be overwritten, please stash". This never happens in jj, by design. It's nicer than "auto-stash" options of recent git versions.
Ok, so I have to admit I started skimming soon, because after explanation of `jj new`, I thought this is just `git commit --allow-empty`. Oh, and you can specify the message! Add `-m` and you are done.
Then it's a series of either git ammends or `git checkout -b` etc.
Now, since there is so much high praise in this comment and sibling comments, what am I really missing? From the post it just seems like the person hates branches for an unspecified reason.
Here's my workflow, of the past 15 years:
- git checkout main
- git pull
Do some changes. Do some more changes. Now:
- git checkout -b <feature-name>
- git status
- gvim into every file and then :Gvdiffsplit, select what I want to stage for each file
- git push # open PR if I think it's ready
For the remaining changes not in the commit, I either create a separate commit, or discard.
An honest question of curiosity, how does jj improve this workflow?
I started using jujutsu after the last round of blog posts here, and have found it super super useful to my mental model of git and vcs.
Stealing Fintan's `jj tug` alias from this post is something I have already found useful. Highly recommend if anyone is on the edge of trying to just give it a shot!
From git's perspective, jj bookmarks are just regular git branches, so you can just do `jj git push` and open a PR as usual.
However, unlike git, jj bookmarks are pinned to change IDs instead of immutable commit SHA-1s. This means that stacked PRs just work: Change something in the pr-1 bookmark, and all dependent bookmarks (pr-2, pr-3, ...) are automatically updated. A `jj git push --tracked` later and everything is pushed.
I tried Jujutsu on a simple repo and it ended up a mess I couldn't fix. Never had that with git. Might be my lack of knowledge but it shouldn't allow this.
Did you reach out to `git` commands to make changes to the repo? If you use jj in a colocated repo you should _only_ use jj to manage the repo to ensure it's kept in-sync with jj's data.
anyone who is using jj, or curious about using it, please do yourselves a favour and check out jjui - its an incredible TUI for jj. Brings it to yet another level.
I used jj for a while and it was so problematic and seemed like nothing added value as compared to git. And now in the world of LLMs it is more difficult to switch to jj.
I actually think jujutsu is _more_ ideal for the agentic era. It makes it so easy to explore directions, experiment, play, backtrack, move commits around, etc.
Yup. Still 0 incentive to try jj. I’m still very much convinced most of the problems solved by jj either do not exist or are already solved by recent features of git.
It’s good alternatives of popular tools exist but git would not be my first bet as a tool that needs fixing…
I mean, undo alone is a killer JJ feature. Sure, you can always somehow undo any git operation if you dig deep enough, but the ease of use on the JJ side without question.
JimDabell|6 months ago
sestep|6 months ago
Are there others who've previously made heavy use of VS Code's builtin Git staging support and have successfully migrated to JJ? Anything I'm missing?
diarrhea|6 months ago
The result is that `jj evolog -p` will show detailed history of your actions. But all but the most recent commit are hidden, so neatly tucked away behind the same change as usual.
Another favorite is git no longer yelling at me and having meltdowns about switching branches - "files would be overwritten, please stash". This never happens in jj, by design. It's nicer than "auto-stash" options of recent git versions.
wirybeige|6 months ago
prerok|6 months ago
Then it's a series of either git ammends or `git checkout -b` etc.
Now, since there is so much high praise in this comment and sibling comments, what am I really missing? From the post it just seems like the person hates branches for an unspecified reason.
Here's my workflow, of the past 15 years:
- git checkout main - git pull
Do some changes. Do some more changes. Now:
- git checkout -b <feature-name> - git status - gvim into every file and then :Gvdiffsplit, select what I want to stage for each file - git push # open PR if I think it's ready
For the remaining changes not in the commit, I either create a separate commit, or discard.
An honest question of curiosity, how does jj improve this workflow?
WolfeReader|6 months ago
codethief|6 months ago
LadyLag|6 months ago
Stealing Fintan's `jj tug` alias from this post is something I have already found useful. Highly recommend if anyone is on the edge of trying to just give it a shot!
vlovich123|6 months ago
watusername|6 months ago
However, unlike git, jj bookmarks are pinned to change IDs instead of immutable commit SHA-1s. This means that stacked PRs just work: Change something in the pr-1 bookmark, and all dependent bookmarks (pr-2, pr-3, ...) are automatically updated. A `jj git push --tracked` later and everything is pushed.
mac-monet|6 months ago
IshKebab|6 months ago
ephimetheus|6 months ago
The only thing I’m missing now is support for git submodules, especially when working with workspaces.
This requires me to keep using git worktrees with collocated jj in each of them, which is suboptimal.
steveklabnik|6 months ago
roman_soldier|6 months ago
Zambyte|6 months ago
landr0id|6 months ago
If you messed up with jj commands, you can use the op log to fix https://jj-vcs.github.io/jj/latest/operation-log/
nchmy|6 months ago
https://github.com/idursun/jjui
theusus|6 months ago
r5Khe|6 months ago
steveklabnik|6 months ago
throwaway755755|6 months ago
_flux|6 months ago
vinnyhaps|6 months ago
frizlab|6 months ago
It’s good alternatives of popular tools exist but git would not be my first bet as a tool that needs fixing…
magnio|6 months ago
rootnod3|6 months ago
mrbonner|6 months ago