Pulling Teeth
Here’s my formula to learn Jujutsu:
- Clear the slate. Drop your Git mental model.
- Embrace a few new assumptions. They’ll seem repugnant at first. Suspend judgment: they pay off.
- Learn the very few building blocks.
- Profit.
After this, you will:
- Be astounded by amazing, extravagant workflows. Learn them, invent new ones.
Let’s tackle step 2. Prepare to cringe.
Git Was An Adorable Maverick
As an old programmer, I clearly remember Git’s debut sparking angry protests:
- “A local copy of the whole history? It’s so stupid!”
- “Branches aren’t real branches!”
- “Rewriting history? Heresy!”
- “No central server! The world will collapse into anarchy!”
It was a fun show and I never expected a sequel.
Jujutsu, More Maverick Than Git
Let’s pull this tooth (feel free to yell at clouds):
- It force-pushes by default.
- It commits by itself.
- Even
statusandlogcommit. - Rebases happen automatically.
- By default, Git ignores files. Jujutsu tracks them.
- Commits are mutable.
- Detached HEAD is the standard.
- You idiomatically commit before coding.
- It deletes commits without warning.
Jujutsu seems to be designed to upset Git fans, and by what it removes:
- It’s branchless.
- There’s no index.
- No stash.
- No
mergecommand. - No
cherry-pick,reset, oradd.
Given this baseline, you might be surprised that Jujutsu users:
- Often work in the middle of a branch, not at its tip.
- Send changes forward and backward through time.
- Work on multiple branches at once.
- Develop features simultaneously, then dispatch changes to their branches.
If you are horrified, wait until you realize you might love every bit of it.
Still here? Good. Ready for step 3. Let’s learn the building blocks and finally profit.