> For the complete documentation index, see [llms.txt](https://docs.hex-rays.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hex-rays.com/ida-9.3/add-ons/teams/how-tos/resolving-conflicts.md).

# Resolving conflicts

When a user needs to commit changes made to a file, but that same file has received other modifications (likely from other users) in the meantime, it is necessary to first "merge" the two sets of modifications together.

When the two sets of modifications do not overlap, merging is trivial - at least conceptually. But when they do overlap, they produce conflict(s).

Since Teams focuses on collaboration over IDA database files, the rest of this section will focus on the different strategies that are available for resolving conflicts among those.

The Teams comes with multiple strategies to help in conflict resolution of IDA database files:

* [Auto-resolve (if no conflicts)](#auto-resolve-if-no-conflicts)
* [Auto-resolve, prefer local](#auto-resolve-prefer-local)
* [Auto-resolve, prefer remote](#auto-resolve-prefer-remote)
* [Interactive merge mode](#interactive-merge-mode)
* [Use local, discard remote](#use-local-discard-remote)
* [Use remote, discard local](#use-remote-discard-local)

## Auto-resolve (if no conflicts)

1. Launch IDA in a non-interactive batch mode, attempting to perform all merging automatically.
2. If any conflict is discovered, bail out of the merge process, and don’t modify the local database.

## Auto-resolve, prefer local

1. Launch IDA in a non-interactive batch mode, attempting to perform all merging automatically.
2. If a conflict is discovered, assume that the "local" change (i.e., the current user’s change) is the correct one, and apply that.
3. Once all merging is done and conflicts are resolved, write those to the local database and exit IDA.

## Auto-resolve, prefer remote

1. Launch IDA in a non-interactive batch mode, attempting to perform all merging automatically.
2. If a conflict is discovered, assume that the "remote" change (i.e., the change made by another user) is the correct one, and apply that.
3. Once all merging is done and conflicts are resolved, write those to the local database and exit IDA.

## Interactive merge mode

This is a manual merge mode.

1. Launch IDA in an interactive, 3-pane mode, allowing the user to decide how to resolve each conflict.
2. Once all merging is done and conflicts are resolved, exit IDA and write the changes to the local database.

## Use local, discard remote

1. Select the local database, ignoring all changes in the remote database.

No IDA process is run.

## Use remote, discard local

1. Select the remote database, ignoring all changes in the local database.

No IDA process is run.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hex-rays.com/ida-9.3/add-ons/teams/how-tos/resolving-conflicts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
