Skip to content

Resolve conflicts ​

When Git cannot combine two sets of changes by itself, it pauses and asks you to decide. This page shows how to make that decision in BranchPilot and finish, or back out safely.

What a conflict is ​

A conflict happens when two commits change the same lines of a file in different ways, or one deletes a file the other edits. Git cannot know which version you want, so it stops in the middle of the operation and marks the file as conflicted.

Inside a conflicted text file, Git writes both versions between marker lines:

text
<<<<<<< HEAD
the version on your side
=======
the version coming in
>>>>>>> feature/refunds

Conflicts can happen during a merge, a pull, a rebase, a cherry-pick or a revert. BranchPilot handles all of them the same way.

What you see ​

A banner appears at the top of the changes panel. It names the operation and says Resolve conflicts, then continue.

BannerButtons
Merge in progressAbort, Continue
Rebase in progressAbort, Skip commit, Continue
Cherry-pick in progressAbort, Continue
Revert in progressAbort, Continue

The files that need a decision are listed under Conflicted, each with a U badge and three buttons.

Resolve each file ​

For every file under Conflicted, choose one of three ways.

ButtonWhat it does
Take oursKeeps your side's version of the whole file and discards the incoming one.
Take theirsKeeps the incoming version of the whole file and discards yours.
Mark resolvedAccepts the file as it is on disk right now. Use it after editing the file by hand.

To keep parts of both versions:

  1. Open the conflicted file in your editor.

  2. Find each block between <<<<<<< and >>>>>>>. Edit it into the text you want, and delete the three marker lines.

  3. Save the file.

  4. Back in BranchPilot, select Mark resolved on that file.

A resolved file leaves the Conflicted list. If it differs from your last commit, it shows under Staged.

WARNING

Take ours and Take theirs replace the whole file with one side. Every change the other side made to that file is dropped, not only the conflicting lines. Mark resolved does not check the file: if conflict markers are still in it, they are committed as they are.

Ours and theirs during a rebase

In a merge, "ours" is the branch you are on and "theirs" is the branch being merged in. During a rebase Git swaps the meaning: "ours" is the branch you are rebasing onto, and "theirs" is your own commit being replayed.

Continue ​

Continue stays disabled while any file is still under Conflicted. When the list is empty, select Continue.

  • A merge completes with a merge commit.
  • A cherry-pick or revert completes, and BranchPilot confirms with Cherry-pick complete or Revert complete.
  • A rebase moves on to the next commit. It can stop again if a later commit also conflicts; you then see Paused again — more conflicts to resolve. Repeat until it reports Rebase complete.

Skip a commit during a rebase ​

Skip commit leaves the current commit out of the rebased branch and moves on. BranchPilot asks Skip the current commit? and warns: Its changes are discarded.

Abort ​

Abort cancels the whole operation and puts things back as they were before it started. BranchPilot asks for confirmation first:

  • Abort merge? The working tree is restored to its state before the merge.
  • Abort rebase? The branch is restored to its state before the rebase.
  • For a cherry-pick or revert, the working tree is restored to its state before the operation.

Any conflict resolutions you made during the operation are lost when you abort.

If you close the app in the middle ​

The paused operation is stored in the repository, not in BranchPilot. When you open the repository again, the banner and the Conflicted list come back and you can carry on.

Next steps ​