This is a guide for those who really want to use the Jujutsu VCS but don't have enough

  • time
  • dedication
  • brainpower

This guide will take you through about 80% of Jujutsu (jj)'s features in about 10 minutes. The end goal is to feel comfortable using Jujutsu.

I picked up Jujutsu about a month ago as a total beginner. It felt daunting at first, but once you get the basics down, it becomes much nicer and simpler to use than git. Here's how I learned it and how you can get the hang of it.

Installing Jujutsu

I'm not going to go through the entire installation process. Install Jujutsu by following the steps here

Initialization

Jujutsu can (and should) be used alongside your git repository. You don't need to completely migrate anything. You can start using Jujutsu in your git repository immediately! Think of it as a different frontend to a repository.

To initialize your jujutsu repository, enter this in your git working directory.

jj git init --colocate

Colocation allows for both jj and git to share the same working directory, allowing you to use jj while syncing your changes to an underlying git repository. Your teammates can continue using git perfectly fine.

The JJ Workflow

Before we proceed with the actual commands, you need one idea: in jj, your working directory itself is a commit.

When you start working on a jj repo, all your changes are saved automatically (shown as @), there's no staging area and no git add. Think of it like git with auto-commit on but you can rewrite it later.

Here's how it works:

  1. Make a new change: jj new
  2. Work on it: edit files normally, jj tracks them automatically
  3. Describe it: jj describe -m "add login page"
  4. Push it: jj git push

Now, here's how it looks like in practice:

jj new main
# ... edit files
jj st                             # see what changed in @
jj log                            # see the commit graph
jj describe -m "add login form"   # describe the change, acts like commit msg
jj git push --change @            # push it to a branch for review

Reading the Log

Oops, Undo!

Made a mistake? You can easily undo the last command you ran by running

jj undo

Want to undo to a specific point in history? View your operation log:

jj op log

This will show you a list of repository states, each with an operation ID. You can go back to a specific operation by running

jj op restore <OPERATION_ID>

Want to undo your entire working directory and go back to scratch?

jj restore

Bookmarks, not Branches

Confident Now?

Hopefully by this point, you know how to use Jujutsu at least semi-confidently. If you need some other great resources I would recommend:

If you have any questions or suggestions to this post, feel free to contact me via email! I'm not a perfect teacher, and I'd appreciate any feedback!