> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prophecy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Resolve conflicts

> Resolve conflicts that you may run into while merging your changes

This page describes how to resolve conflicts that you may run into while merging your changes. There are two ways to resolve merge conflicts when they arise:

* Merge using the Prophecy interface
* Merge in your external Git interface

## Merge in Prophecy

There are a couple of ways to manually resolve merge conflicts in Prophecy.

### Left or right merge strategy

The Left or Right merge strategy gives you a the option to resolve the conflict by choosing one version of your code to keep. After choosing, you can click **Next** to continue the merge process.

<img src="https://mintcdn.com/prophecy-62973bd0/6yiaaii50cGrpbpw/data-engineering/ci-cd/git/img/git-conflict-manual-merge.png?fit=max&auto=format&n=6yiaaii50cGrpbpw&q=85&s=5d6063940870b1ec70dac19b6a8c30ee" alt="Choose a Git conflict manual merge" width="2620" height="1508" data-path="data-engineering/ci-cd/git/img/git-conflict-manual-merge.png" />

* **(A)** **Strategy**: You must choose a preferred strategy to resolve the conflict. Here the Left strategy keeps the version on branch `master`, while the Right strategy keeps the version on branch `dev`.
* **(B)** **Open on master**: Clicking this opens the model on branch `master` for you to view.
* **(C)** **Open on dev**: Clicking this opens the model on branch `dev` for you to view.

Here are the read-only views on branch `master` on the left and branch `dev` on the right:

<img src="https://mintcdn.com/prophecy-62973bd0/6yiaaii50cGrpbpw/data-engineering/ci-cd/git/img/git-conflict-merge-strategy.png?fit=max&auto=format&n=6yiaaii50cGrpbpw&q=85&s=12fab85e595d3fd0d841df5dff154f18" alt="View Git conflict merge strategies" width="2812" height="898" data-path="data-engineering/ci-cd/git/img/git-conflict-merge-strategy.png" />

### Code changes merge strategy

For SQL, you can also toggle on **Code Changes** to view and edit the code before validating. You can resolve conflicts by making code changes directly on the files.

<img src="https://mintcdn.com/prophecy-62973bd0/6yiaaii50cGrpbpw/data-engineering/ci-cd/git/img/git-conflict-code-changes.png?fit=max&auto=format&n=6yiaaii50cGrpbpw&q=85&s=5c91b13b268b8c41447d1996bcd37f3f" alt="View Git conflict merge strategies" width="2620" height="1508" data-path="data-engineering/ci-cd/git/img/git-conflict-code-changes.png" />

Once you've made the changes that you want to keep, click **Next**. The merge process will compile the files.

<Info>
  Errors caused by conflict resolution

  In rare cases, your merge attempt may result in an error after the compile completes. You'll be asked to fix the error before proceeding. See **Diagnostics** at the bottom for details on what the error is and how you might go about fixing it. Once you've fixed the error, click **Try Again**.

  If you're confident that the errors are fine to leave as is, click **Ignore Errors**.
</Info>

## Remote and local branch conflicts

If your commit history differs between a remote and local branch (due to actions like rebasing and reverting), one way to resolve this is to delete one of the branches.

To delete the local branch:

1. Open the **Git** menu from the project footer.
2. Choose **Delete branch**.
3. Select the branch you wish to delete.
4. Click the **Delete local branch** button.
5. Click **Delete** to confirm deletion.

<img src="https://mintcdn.com/prophecy-62973bd0/6yiaaii50cGrpbpw/data-engineering/ci-cd/git/img/git-delete-branch.png?fit=max&auto=format&n=6yiaaii50cGrpbpw&q=85&s=f3e31984d86f985db7790af2c9d41756" alt="Delete a Git branch" width="2812" height="900" data-path="data-engineering/ci-cd/git/img/git-delete-branch.png" />

To delete the remote branch, do so from your external Git provider.
