News for hackers. Stuff that matters.

sgjennings

Re:Awesome-Jj: Jujutsu Things on Monday December 15, 2025 @05:36PM (#46281785)
I am quite comfortable with `git rebase -i` and I still prefer jj.

Most importantly, I get in this situation less often in the first place. Because reodering and squashing commits can be done with an easy command[1], I tend to squash or rebase as I think of it instead of batching it up to do all at once.

Many times, I don't need to manually target which commit to squash into at all, because I can be editing at the tip of the branch, then use `jj absorb` to automatically squash all my changes down into the commits where they belong.[2]

And `jj undo` is just easier to use than the reflog[3]. While reading the reflog you posted, I have to mentally replay each commit step by step. But really, if I messed something up, it's most likely I want to just go back to `HEAD@{31}`. `jj rebase` is atomic, so the whole thing is undone with one invocation of `jj undo`.

[1]: https://docs.jj-vcs.dev/latest/git-experts/#automatic-and-sa...

[2]: https://docs.jj-vcs.dev/latest/git-experts/#jj-absorb-makes-...

[3]: https://docs.jj-vcs.dev/latest/git-experts/#undo-is-more-pow...

Re:Jujutsu for Everyone on Monday September 01, 2025 @06:59AM (#45091624)
I’ll focus only on the syntax of the command. Why you might need it at all is important, of course, but it’s nuanced and specific to how some people work (I never need this command or anything like it, for example).

> jj bookmark move

Presumably, this part is reasonably clear. “I want to move a bookmark.”

> main

Which bookmark to move. I think this is probably clear from context?

> --to @-

And here’s the part that looks foreign to a non-jj user. This syntax is familiar to jj users because the same revset syntax is used across the whole CLI. `@` is the working copy commit (the commit you have “checked out” that you are currently editing), and `@-` specifies its parent.

Because it’s just a revset, you could specify that same command in a number of ways:

- If you know the parent’s commit ID or change ID, you could use that instead: `--to abc123`

- If there happens to be another bookmark already there, you can use its name: `--to other-feature`

- You probably wouldn’t type this in the terminal, but you could do exotic things like `--to 'mutable() & description("foobar2000")'` to assign the bookmark to the work-in-progress commit that has "foobar2000" in the commit message.

Revsets used pervasively are one of the things that make the DX lovely.

Re:Jujutsu for Everyone on Monday September 01, 2025 @06:35AM (#45091465)
You can work exactly this way using the “gitpatch” diff editor[1].

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...

Re:Jujutsu for Everyone on Sunday August 31, 2025 @04:47PM (#45086931)
I recently updated that FAQ so it preserves the original commit ID. It’s in the prerelease docs now and will move to “latest” with the release this week: https://jj-vcs.github.io/jj/prerelease/FAQ/#i-accidentally-c...
Re:Jujutsu and Radicle on Friday August 15, 2025 @01:53AM (#44909034)
I mostly solve this by putting a branch on the merge commit M, then the “real” change R is a child of that. The PR is targeted to merge R into M.

As the parents of M are merged, I rebase the whole stack. When M has a single parent left, I abandon M and retarget the PR to merge R into that parent.

It requires a little babysitting, but the PR shows the diff I want it to.

Re:I'm daily driving Jujutsu, and maybe you should too on Saturday December 14, 2024 @05:31PM (#42419943)
The way I handle that with jj is to keep those changes in a commit “on the side” rather than making them “on top” of the working copy. The FAQ entry for this describes the process (https://martinvonz.github.io/jj/latest/FAQ/#how-can-i-avoid-...):

- Make a commit off main that includes these private changes

- Make a commit for the work you’re doing

- Create a merge commit on top of these two changes and work there

This works because the “DEBUG=true” change is already committed, but in a commit you never push to the remote. jj makes it easy to continually squash the work you want to keep from the merge commit into one where it belongs. And, there is a “private commits” setting you can use to prevent accidentally pushing that commit somewhere.

Re:Clef – stop using passwords on Wednesday February 12, 2014 @11:39PM (#7229463)
Authy's app works with Google Authenticator-compatible sites. Authy also has its own two-factor system, but you're not required to use it.