Jujutsu (jj) is a VCS unlike most other, its user interface is separated from it storage system(s). This allows it to serve as a VCS with many possible physical backends, that may have different data/networking models.

Currently it uses git by default as storage layer, making it compatible with all the existing git ecosystem.

Martin started it as a hobby project in 2019, and now it’s his full-time project at Google.

Design

Jujutsu combine concepts from other VCS-es into a single tool. For example:

  • Git: fast/efficient algorithms, data structures
  • Mercurial and Sapling: the revset language, no index or staging area, anonymous branches, output formatting with a robust template language
  • Darcs: conflicts are first-class objects, can be commited and resolved later or by somebody else

But it also has some new features:

  • Working-copy-as-a-commit: changes to files are automatically recorded as commits and amended on every subsequent change (simplifies algorithms, make index/stanging-area obsolete)
  • Operation log, undo: every operation is logged into the repository itself, so debugging “what has happened here?” like problems is pretty easy. Also there’s an undo command that utilizes this oplog.
  • Automatic rebase and conflict resolution: when you modify (an older) commit, every descendant is automatically rebased on top of the new version - without branching and whatever. If there’s a conflict anywhere in the branch, you can resolve it any time, due to this propagation, the resolution will be available for the descendants as well.

The jj command

The command-line tool is called jj (for now, it might be changed later) because it’s easy to type, and since the letter “j” is rare in English, it’s easy to search for. (The project is called Jujutsu because it matches jj.)

The goal was to create a user friendly interface to the VCS - this definitely wasn’t the goal for git, most developers use external tools or IDE plugins to use it. Since you can use jj to manage existing git repos, it can be used as one of those tools - but it’s already much more than just a git frontend. I’m using it almost exclusively for my daily work (on existing git repos) for about 3 months, and I didn’t have to use the git command on the given repos in the meantime.

Git doesn’t became “popular” because it’s good or user friendly, it became popular due to GitHub. Now that we can use GitHub with jj, we might get rid of git ;)

Basic workflow (that I use)

# create a new 'change' (basically ticket=change)
$ jj new [parent]
$ jj describe -m "TICK-90: whatever new feature"
# or `jj new -m "..."`
# since I need to push to GitHub, I need named branches
$ jj branch create TICK-90_whatever
# and I might need to update my change with the changes from upstream
$ jj git fetch --branch develop
$ jj rebase -d develop
# and push it back to github
$ jj git push [branch]

Nice log

jj log

… and much more …

If you are interested, you can check the following resources: