Skip to content
Versora

Manual

Conflicts

Conflicts

4 min read

On this page

A conflict happens when git needs to combine two versions of a file and both changed the same part in different ways. git doesn't choose on its own: it stops the operation, leaves the file with the <<<<<<<, ======= and >>>>>>> markers and waits for you to decide what stays.

In Versora you don't need to edit the markers by hand. The conflicted file appears in its own section of the changes panel, and a click opens the conflict editor: the two versions side by side, the editable result below and a checkbox on each block and on each line.

When conflicts appear

Any operation that combines changes can stop at a conflict:

OperationWhat stays stoppedHow to go on after resolving
Merge (including the one from pull)A merge in progressContinue on the bar, or commit from the commit box
Rebase (including the one from pull with rebase)The rebase, at the commit that conflictedContinue (or Skip the commit)
Cherry-pickThe cherry-pick, at the commit that conflictedContinue (or Skip)
RevertThe revert, at the commit that conflictedContinue (or Skip)
Apply a stash, pop, apply a patch with 3-way, apply part of a stash with 3-wayNothing stays "in progress": only the conflicted filesResolve the files; there's nothing to continue
Local squash mergeThe conflicted files, with the prepared message in the commit fieldResolve and commit from the commit box

The autostash of pull and checkout can also bring your changes back with a conflict. That case is explained in Autostash.

What you see when an operation stops

  1. A notice says the operation stopped and lists up to eight files, for example: "The operation stopped because there are conflicts in 2 files.", followed by "Click each file in the "Conflicted" section to resolve it in the conflict editor, then click Continue — or Abort to give up."
  2. In the changes panel (select the WIP row in the graph), the operation bar appears, for example Merge in progress, with the Continue, Skip (except in a merge) and Abort buttons. See Operations stopped halfway.
  3. Right below, the Conflicted section lists the files that need a decision. Each one has the Conflicted status.
  4. In a rebase, the graph's WIP row gets the note "conflict: <commit>", with the full explanation in the tooltip.

Current and incoming

The editor and the menus call the two sides Current and Incoming, which are git's ours and theirs. Next to each name, Versora shows the real name (the branch, the commit) and that side's role in the operation, because the role changes from one operation to another:

OperationCurrent (ours)Incoming (theirs)
Mergethe branch you're onwhat's being merged into your branch
Rebaserebase base: the target, with the commits already reappliedyour commit that's being reapplied
Cherry-pickthe branch you're onthe commit being applied (cherry-pick)
Revertthe branch you're onhow the file looked before the commit being reverted
Applied stash or patchthe branch you're onthe changes that were set aside (stash or patch)

Caution

In a rebase the roles are reversed compared to a merge: the Current version is the target branch, and the Incoming one is your own commit. Before using "Accept all current" or "Resolve several…" in a rebase, check the name that appears next to each side.

Typical flow

  1. Run the operation (merge, rebase, cherry-pick, revert or applying a stash).
  2. If it stops, open the WIP row and click the first file in the Conflicted section.
  3. In the editor, choose blocks and lines from each side, or edit the result, and click Save and mark resolved. The file leaves the Conflicted section and goes to the stage.
  4. Repeat for the other files, or resolve several at once with Resolve several…. Got a resolution wrong? Ctrl+Z undoes the last step, and Reopen, in the Resolved section, sends a resolved file back to the editor.
  5. With the section empty, click Continue on the bar. To give up on everything, Abort. Once finished, the whole operation goes into Ctrl+Z.

Predict before you start

Versora can warn you beforehand that an operation will conflict: on cherry-pick and revert (in-memory preview), on merge and rebase between branches and with the ⚠ on the branches that would conflict with the target. See Predicting conflicts before an operation.

Pages in this area

  • The conflict editor: the three panes, choosing by block and by line, editing the result, the markers next to the scrollbar, saving, starting over, reopening an already resolved file and the conflicts that aren't about content (binary, file deleted on one side, submodule).
  • Resolving several files at once: keeping the current or the incoming version in several files, marking as resolved and the markers warning in "Stage all changes".
  • Stopped merge, rebase, cherry-pick and revert: the operation bar, Continue, Skip and Abort, the merge stopped by a hook and what Ctrl+Z does in that state.
  • Predicting conflicts before an operation: the cherry-pick and revert preview and where the other predictions are.

See also