Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Visualizing Conflicts

Important

You see how Jujutsu warns you about a conflict.

○  nz        **merge-b**
│ ○  m         **merge-a**
├─╯
○  vr       Base of merge-a and merge-b
│
~

Let’s create the conflict.

Warning

Merge merge-a and merge-b with the message Merge conflict.

Tip

jj new merge-a merge-b -m "Merge conflict"

Swapping arguments (jj new merge-b merge-a) swaps the conflict details in the file, but doesn’t change the logic. I assume you used merge-a first.

The merge succeeds, but Jujutsu warns:

Warning: There are unresolved conflicts at these paths: file.txt    2-sided conflict

Notice: it’s a warning, not an error.

jj log displays conflicted Changes with red @ and × symbols:

§    t    (empty) Merge conflict
├─╮
│ ○  nz   **merge-b**
○ │  m    **merge-a**
├─╯
~

As anticipated, a conflict won’t stop your work. Let’s challenge this notion.