jj-status
Show repository working copy status
TLDR
Show high-level status of the repository
SYNOPSIS
jj status [OPTIONS]
PARAMETERS
-r, --revision
Show status relative to a specific revision instead of the working-copy commit. This allows comparing the working directory against an arbitrary commit in the history.
-s, --summary
Display only a brief summary of the changes, omitting detailed file differences.
--color
Control when to use color in the output. WHEN can be 'auto' (default), 'always', or 'never'.
--pager
Control when to use a pager for the output. WHEN can be 'auto' (default), 'always', or 'never'.
--plain
Suppress all colors and fancy formatting, producing plain text output.
--tool
Specify an external tool to use for displaying diffs or resolving conflicts. This option might influence how certain details are presented if a diff tool is integrated.
--width
Set the maximum width of the output in characters, affecting text wrapping and formatting.
DESCRIPTION
jj-status is a fundamental command in the Jujutsu (jj) version control system, analogous to git status. It provides a comprehensive overview of the current state of your working copy relative to the current commit in the repository. This includes:
Uncommitted Changes: Files that have been modified but not yet committed.
Staged Changes: In Jujutsu, there isn't a direct concept of a 'staging area' like Git. Instead, changes are typically committed directly or iteratively built. jj-status focuses on the differences between the working copy and the parent commit.
Conflicts: Files or directories that have merge conflicts requiring resolution.
Current Branch/Commit: Information about the active commit and any associated branches or tags.
The command helps developers quickly identify what needs to be committed, what changes are in progress, and if there are any issues preventing a clean commit.
CAVEATS
Jujutsu (jj) is a relatively new version control system. While jj-status serves a similar purpose to git status, its underlying data model and how it handles concepts like staging areas differ significantly. Users accustomed to Git should be aware that their workflow with jj-status might feel slightly different, particularly regarding how changes are considered 'staged' or 'unstaged'.
The command requires Jujutsu to be installed and run within a jj repository.
OUTPUT INTERPRETATION
jj-status output typically groups changes into categories:
Modified: Files that have changed.
Added: New files not yet tracked.
Removed: Files deleted from the working copy.
Conflicted: Files with merge conflicts.
It also clearly indicates the current commit, its parent(s), and any associated branches or description. The output aims to be clear and concise, often using colors to highlight different types of changes.
WORKING DIRECTORY VS. WORKING COPY
In Jujutsu, the 'working copy' refers to the set of files and directories that you are currently editing. jj-status compares the state of this working copy with the 'working-copy commit' (the commit that the working directory is currently based on). Any differences are reported as changes that are not yet part of a commit.
HISTORY
The jj-status command is an integral part of the Jujutsu (jj) version control system, which was publicly released in 2022. Jujutsu was developed with the goal of providing a simpler, more powerful, and Git-compatible alternative, focusing on a more intuitive data model for commits and branches. jj-status was included from the initial design to offer immediate feedback on the state of the working directory, reflecting Jujutsu's emphasis on direct manipulation of the commit graph and efficient change tracking.