Skip to main content

Jujutsu Version Control: Setup

·2 mins

This article is the first in a series of articles introducing the Jujutsu version control system. This article covers the following topics involved with setting up Jujutsu:

  • Installing Jujutsu
  • Setting the author for commits
  • Setting the text editor to use for commit messages

Installing Jujutsu #

The first step to using Jujutsu is to install it. The Jujutsu documentation lists ways to install Jujutsu.

The easiest way to install Jujutsu is to download a prebuilt binary and copy the jj binary file to a desired location. The Jujutsu developers include binaries for Linux, Mac, and Windows. I installed the binary at /usr/local/bin on my Mac.

Setting the Author for Commits #

To get Jujutsu to show your name as the author of changes you make, run the jj config set command and use the --user option. Set the user name and email address.

jj config set --user user.name "Your Name"
jj config set --user user.email "your.name@example.com"

You can also set the user name in Jujutsu’s cargo.toml configuration file. On Mac the cargo.toml file is located at the following path:

~/.config/jj

Press Cmd-Shift-Dot to show hidden files in the Finder and locate the cargo.toml file.

Add the following text to the cargo.toml file and supply your name and email address:

[user]
name = "Your Name"
email = "your.name@example.com"

Setting the Editor for Commit Messages #

Run the jj config set command to set the text editor to use for commit messages. Add the --user option. Enter ui.editor and supply the name of the editor.

For a Terminal editor like Vim or Emacs, put the name in quotes. For a GUI editor, add a space and -w after the name.

The following example sets the editor to VS Code:

jj config set --user ui.editor "code -w"

The Windows version of VS Code has the name code.cmd instead of code.

You can also set the editor in the config.toml file. Add the following text to set the editor to BBEdit:

[ui]
editor = "bbedit -w"