Skip to main content

Jujutsu Version Control: Repositories

·3 mins

In this article, you will learn how to create a Jujutsu repository, view the contents of a repository, and view the current repository status.

Creating a Jujutsu Repository #

To use Jujutsu you must create a repository to track the files in your project. Run the jj git init command to create a repository. Currently Jujutsu uses git as the backend for repos so you have to include git in the command.

If you are also using git in your project, use the --colocate option. Colocating the Jujutsu repo means the Jujutsu and git repos share a working copy. Existing tools that work with git, like text editors and IDEs, will see the changes you make to the project. If you commit from one of these tools, the commit also appears in your Jujutsu repo.

jj git init --colocate RepoName

If you are not using git, you can omit the --colocate option.

The Jujutsu repository is in a .jj folder inside the project folder.

Viewing Repository Contents #

Run the jj log command, which you can shorten to jj, to view the contents of a Jujutsu repo.

jj log

The contents of a new Jujutsu repo look similar to the following output:

@  powyprrv mark@example.com 2025-07-25 15:19:42 7320284b
│  (empty) (no description set)
◆  zzzzzzzz root() 00000000

There are two changes in this output. The first change takes up the first two lines. The @ indicates this change is the working copy, the current change. The powyprrv is the change ID that uniquely identifies the change. A change’s ID never changes.

Some Jujutsu commands take a change ID as an argument. The first characters of the change ID appear as a different color in the log. Those characters are enough to uniquely identify the change. This means you can type only those characters in a command instead of typing the whole change ID.

After the change ID is the change author’s email address, followed by the timestamp of the change. The 7320284b is the commit hash. The commit hash can change. Most of the time you can ignore the commit hash.

The second line shows the description of the change. A new repo is empty with no description.

The third line shows the second change, which is the repo’s root change. The diamond on the left side indicates the change is immutable. The root change has no author and no timestamp.

Viewing the Current Repository Status #

Run the jj status command, which you can shorten to jj st, to view the current status of the repo.

jj status

The status of a new Jujutsu repo looks similar to the following output:

The working copy has no changes.
Working copy  (@) : powyprrv 7320284b (empty) (no description set)
Parent commit (@-): zzzzzzzz 00000000 (empty) (no description set)

If the working copy has changes, the output shows the files that were changed.

The status output shows the working copy and the parent commit. You can supply the working copy to Jujutsu commands by typing @ and supply the parent commit to Jujutsu commands by typing @-.

The status output for both changes includes the change ID, commit hash, and a description of the change. The (empty) text indicates an empty change. A newly created Jujutsu repo has no real changes so the working copy is empty until you make changes in your project.