Trying jj with this blog’s git repo
Current status: I’m trying
Jujutsu,
aka jj,
to manage this blog’s git repo.
I’ve used git since … 2011-ish? I tried jj once before but assumed it’s not worth the learning curve. My use cases are so simple these days, as I use git as a personal backup and sync tool rather than for collaboration with other people, which is where things get more interesting.
But I recently learned my company’s Engineering department is moving to it. That made me stop and think … and ask Gemini if I should bother. Gemini told me:
While jj’s greatest praise comes from developers managing massive “stacked PR” branching trees, its benefits for a single-developer, main-branch-only workflow are arguably even more dramatic. It fundamentally changes your daily relationship with your code.
Okay, okay. Let’s not get carried away, buddy.
But sure, I’ll try it.
I’m using Steve’s Jujutsu Tutorial to learn the basics. I’ve also found this post from Nathan Witmer helpful in understanding how the benefits of jj start to emerge after you get competent at it.
Workflow example: splitting active changes into multiple commits
While writing this post, I ended up with two different sets of changes: (1) this post, and (2) creating and using a new 11ty filter to get curly apostrophes into my blog posts’ titles. I wanted to separate those out into two distinct commits.
Gemini pointed me at jj split for this.
It’s pretty cool.
It launches a TUI in which you can select individual lines to commit, hit c, and write your commit message.
It’s got handy keyboard shortcuts (both Vim-like as well as arrow keys).
For basic staging and committing, it feels quite a bit like using a tool like LazyGit or Magit, but it’s built right into jj.
Neat.
- ← Previous
Em dashes are amazing