Jujutsu
I decided to give jujutsu a try. I’ve been using git for ~15 years and I have created workflows around it. Git is an incredible piece of technology. Back in the day of SVN, when I first switched to git it felt incredible. Not a small evolution like CVS->SVN, but something that was built from the ground up to solve a real problem in our industry.
This change is a little bit different. Jujutsu is great because it works well WITH git. I don’t need to move or convert all my repositories. It uses git as its backing storage. My coworkers can continue using git, and won’t even notice that I switched. If it wasn’t for this, I would probably not even have considered it (i.e., it wouldn’t be worth the effort)
But if it is “just git” under the hood, why change?
As I mentioned before, I created workflows around git and it works fine for me.
For example, I have a worktree wrapper
that I use as my daily driver. Instead of doing git checkout ... I switch
between worktrees. This allows me to work on multiple branches and have files
in the working dir that I don’t want to commit or stash. So my workflow with git
is wt my-new-branch, that creates a separate worktree (directory/working copy)
and I can switch between worktrees using my wt wrapper. That works fine in
most cases.
But things get tricky when you have a base branch and branch off that. Now you have to be very careful making changes to the base branch and remember to rebase, possibly having to resolve conflicts on the dependent ones. This can become a nightmare. There are a few tools/frameworks for dealing with “stacked commits”.
Simplified workflows
Jujutsu seems to handle this in a nicer way though. It is a mindset shift which will take a while for me to adapt, but it allows you more freedom to just write the code and think about how to organize in separate PRs later. In git I do a lot of rebase/squash/fixup, jj makes rewriting the history a breeze
Anyway, I’ll report back in a few weeks with my impressions, but here are some references: