jj-resolve
Resolve Jujutsu commit divergences
TLDR
Resolve all conflicts
List all conflicts
Resolve conflicts in a given revision
Resolve conflicts in given files
Resolve accepting the incoming versions
Resolve accepting the outgoing versions
SYNOPSIS
jj resolve [OPTIONS] [PATHS...]
PARAMETERS
-a, --all
Resolve all conflicts (default behavior)
--clear
Clear conflict state without resolving files
--ignore-missing
Ignore paths that no longer exist
--list
List all conflicted paths without resolving
--no-edit
Resolve metadata only, skip editing files
--output <OUTPUT>
Output format: ui (default), json, json-abbrev
--tool <TOOL>
Resolution tool: internal (default), merge-tool
DESCRIPTION
The jj resolve command is part of the Jujutsu (jj) version control system, a Git-compatible tool designed for efficient handling of version history. It interactively resolves merge conflicts in the working copy, supporting both automatic and manual resolution strategies.
By default, jj resolve targets all conflicted paths, guiding users through three-way merges with clear displays of common ancestor, side1, side2, and resolution states. It leverages Jujutsu's unique operation-based model, where changes are recorded immutably, making conflict resolution safer and more predictable than traditional Git workflows.
Users can invoke external merge tools or rely on the built-in interface. After resolution, it updates the working copy and commit graph automatically. Specifying paths limits scope to specific files or directories. This command shines in large-scale rebases or merges, minimizing manual intervention.
It integrates seamlessly with other jj commands like jj rebase and jj merge, enhancing productivity in modern development environments. Unlike Git's git mergetool, it avoids checkout churn and provides a unified view of conflicts across the repository.
CAVEATS
Requires a repository with active conflicts; does not create backups of conflicted files. External tools must be configured via jj config.
EXAMPLES
jj resolve # Resolve all
jj resolve src/main.c # Specific file
jj resolve --tool merge-tool --list # List with tool
EXIT STATUS
0: Success or no conflicts.
1: Resolution needed or errors.
2: Usage error.
HISTORY
Introduced in Jujutsu 0.1.0 (2023) by Martin von Zweigbergk as part of the core conflict resolution suite. Evolved with tool support in 0.5.0+ to match Git workflows while leveraging jj's rewrite-friendly design.
SEE ALSO
jj(1), git-mergetool(1), merge(1)


