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

# Resolve merge conflicts

> Work through a merge that stopped on conflicting files from inside the Requestly desktop app: read the conflicted file list, pick a side per block in the merge editor, finish the merge, or abort it.

A pull brings your teammates' commits in as a merge. When their edits and yours touch the same lines, Git stops and hands the file back with both versions in it. Requestly takes over from there: the **Git** panel lists the conflicted files, and each one opens in an editor where you choose what the merged file says. Git applies to [local projects](/api-client/git/overview#requirements) only, so the **Git** tab is hidden while a team project is active.

<Info>
  Git requires the **desktop app**. [Download Requestly](https://requestly.com/downloads).
</Info>

## When a merge stops

A conflict raises no toast. The **Git** panel changes instead, and the change is hard to miss.

* The panel body is replaced by the conflict surface, headed **Resolve conflicts** in red.
* The commit box, the **Changes** and **Staged** sections, and the **Commits**, **Stashes**, **Remotes**, and **Sync** sections are all hidden. The panel gives its whole height to the conflict.
* The sidebar status bar shows `(locked)` in place of the ahead and behind counts, and the branch name stops opening the [branch picker](/api-client/git/branches).

Pulling is the usual way to get here. **Merge anyway**, the action on the unrelated-histories message, also runs a merge and can land you in the same place. See [Push and pull](/api-client/git/push-and-pull#when-a-sync-fails).

## Read the conflicted file list

The surface lists one row per conflicted file, under the **Abort merge** button.

| Part of a row                               | What it shows                                                                                                                                                   |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| A red warning icon                          | The file is still unresolved.                                                                                                                                   |
| A green check                               | You have resolved the file.                                                                                                                                     |
| The file name                               | The name only. Hover it to read the full path.                                                                                                                  |
| **unresolved** or **resolved** at the right | The same state in words.                                                                                                                                        |
| **deleted / modified** at the right         | One side deleted the file while the other changed it. This kind has no editor. See [Resolve a deleted and modified file](#resolve-a-deleted-and-modified-file). |

While Requestly reads the list the panel shows "Loading conflicts…". A merge with nothing left to resolve reads "No conflicted files."

<Frame>
  <img src="https://mintcdn.com/requestly/K-Ztz5uJVTElPvBt/images/git-conflict-resolution-panel.light.png?fit=max&auto=format&n=K-Ztz5uJVTElPvBt&q=85&s=1dbd9c6a191f2df64e67e0b2b62b2950" alt="The Resolve conflicts panel with an Abort merge button, one resolved file, one unresolved file, a deleted and modified row, and a disabled Resolve and Commit button" className="dark:hidden" width="1280" height="800" data-path="images/git-conflict-resolution-panel.light.png" />

  <img src="https://mintcdn.com/requestly/K-Ztz5uJVTElPvBt/images/git-conflict-resolution-panel.dark.png?fit=max&auto=format&n=K-Ztz5uJVTElPvBt&q=85&s=779d950279268f2c21c6a6cd35866c10" alt="The Resolve conflicts panel with an Abort merge button, one resolved file, one unresolved file, a deleted and modified row, and a disabled Resolve and Commit button" className="hidden dark:block" width="1280" height="800" data-path="images/git-conflict-resolution-panel.dark.png" />
</Frame>

## Resolve a file in the merge editor

Click a file name to open it as a tab beside your requests, named `Conflict · <file name>`. The editor shows the file with every block the two sides disagree about marked, and three buttons on each block. The text itself is read-only: you settle the file with the buttons rather than by typing in it.

The three buttons read left to right in this order.

| Button              | What it keeps                                               |
| ------------------- | ----------------------------------------------------------- |
| **Accept Incoming** | Their version of the block. Your version is dropped.        |
| **Accept Current**  | Your version of the block. The incoming version is dropped. |
| **Accept Both**     | Both versions, one after the other, yours first.            |

<Tip>
  Undo a choice you did not mean with Cmd+Z on macOS or Ctrl+Z on Windows and Linux, and redo it with Shift added.
</Tip>

<Steps>
  <Step title="Open the file">
    Click its name in the **Resolve conflicts** list.
  </Step>

  <Step title="Settle every block">
    Work down the file, choosing a button on each block. Two buttons in the footer settle the whole file at once: **Keep all current** takes your side everywhere, and **Take all incoming** takes theirs everywhere.

    <Frame>
      <img src="https://mintcdn.com/requestly/K-Ztz5uJVTElPvBt/images/git-conflict-merge-editor.light.png?fit=max&auto=format&n=K-Ztz5uJVTElPvBt&q=85&s=43d6e7f63d15f5e4bbccba9e6f3f83c4" alt="A conflict tab with one disagreeing block, the Accept Incoming, Accept Current, and Accept Both buttons above it, and Keep all current, Take all incoming, and Resolve file in the footer" className="dark:hidden" width="1280" height="800" data-path="images/git-conflict-merge-editor.light.png" />

      <img src="https://mintcdn.com/requestly/K-Ztz5uJVTElPvBt/images/git-conflict-merge-editor.dark.png?fit=max&auto=format&n=K-Ztz5uJVTElPvBt&q=85&s=eb0d2ba93cd3e2c99cd42ee2e64a820a" alt="A conflict tab with one disagreeing block, the Accept Incoming, Accept Current, and Accept Both buttons above it, and Keep all current, Take all incoming, and Resolve file in the footer" className="hidden dark:block" width="1280" height="800" data-path="images/git-conflict-merge-editor.dark.png" />
    </Frame>
  </Step>

  <Step title="Resolve the file">
    **Resolve file** in the footer stays disabled until no block is left. Click it. The tab closes, and the file's row in the panel turns to a green check.
  </Step>
</Steps>

<Note>
  **Resolve file** records your merged text for the final commit. It does not write the file to disk on its own. Requestly writes every resolved file when you finish the merge.
</Note>

### When a file is too large or binary

A file Requestly cannot render in the editor opens on a panel headed "File too large to resolve here", which explains that the file is binary or larger than the diff size limit. It offers one action, **Keep current version**, which resolves the whole file with your copy.

## Resolve a deleted and modified file

When one side deleted a file and the other side changed it, there is no text to merge. The row carries two buttons instead of opening an editor.

| Button              | What it does                                             |
| ------------------- | -------------------------------------------------------- |
| **Keep file**       | Keeps your version of the file and cancels the deletion. |
| **Accept deletion** | Deletes the file.                                        |

Both resolve the file immediately, and the row turns to a green check.

<Frame>
  <img src="https://mintcdn.com/requestly/K-Ztz5uJVTElPvBt/images/git-conflict-delete-modify-row.light.png?fit=max&auto=format&n=K-Ztz5uJVTElPvBt&q=85&s=69ecb48621c85883d72ea6f26a644529" alt="The Resolve conflicts panel with a deleted and modified row expanded to its two buttons, Keep file and Accept deletion" className="dark:hidden" width="1280" height="800" data-path="images/git-conflict-delete-modify-row.light.png" />

  <img src="https://mintcdn.com/requestly/K-Ztz5uJVTElPvBt/images/git-conflict-delete-modify-row.dark.png?fit=max&auto=format&n=K-Ztz5uJVTElPvBt&q=85&s=145df40c72cde198706246a20f0cfd43" alt="The Resolve conflicts panel with a deleted and modified row expanded to its two buttons, Keep file and Accept deletion" className="hidden dark:block" width="1280" height="800" data-path="images/git-conflict-delete-modify-row.dark.png" />
</Frame>

## Finish the merge

**Resolve & Commit** sits at the bottom of the surface. It stays disabled until every file in the list carries a green check.

<Steps>
  <Step title="Check the list">
    Every row should show a green check. A row still on the red warning icon is not resolved yet.
  </Step>

  <Step title="Click Resolve & Commit">
    Requestly writes each merged file to disk, stages it, and records the merge commit. The panel returns to its usual change list.
  </Step>
</Steps>

<Note>
  The merge commit's message is written for you and reads "Merge: resolve conflicts". You cannot change it before the commit, so amend it afterwards if you need a different one.
</Note>

If Git still finds an unresolved file, the commit fails with "Resolve the remaining conflicts before continuing the merge." Resolve the remaining files, then click **Resolve & Commit** again.

## Abort the merge

Aborting throws the merge away and puts your working tree back the way it was before the pull.

<Steps>
  <Step title="Click Abort merge">
    The button sits at the top right of the **Resolve conflicts** header.
  </Step>

  <Step title="Confirm">
    The **Abort merge** window explains that this restores your working tree to before the merge and discards any conflict resolution in progress. Click **Abort merge** to confirm, or **Cancel** to stay in the merge.

    <Frame>
      <img src="https://mintcdn.com/requestly/K-Ztz5uJVTElPvBt/images/git-abort-merge-modal.light.png?fit=max&auto=format&n=K-Ztz5uJVTElPvBt&q=85&s=acbf4d01b1397282d6f9562952cdccc3" alt="The Abort merge window warning that it restores the working tree to before the merge and discards conflict resolution in progress, with Cancel and Abort merge buttons" className="dark:hidden" width="1280" height="800" data-path="images/git-abort-merge-modal.light.png" />

      <img src="https://mintcdn.com/requestly/K-Ztz5uJVTElPvBt/images/git-abort-merge-modal.dark.png?fit=max&auto=format&n=K-Ztz5uJVTElPvBt&q=85&s=af57c6ffe06920e45e02f50ff2eed595" alt="The Abort merge window warning that it restores the working tree to before the merge and discards conflict resolution in progress, with Cancel and Abort merge buttons" className="hidden dark:block" width="1280" height="800" data-path="images/git-abort-merge-modal.dark.png" />
    </Frame>
  </Step>
</Steps>

<Warning>
  Aborting discards every choice you have made in the merge editor so far, on every file. The incoming commits stay on the remote, so you can pull again when you are ready to work through them.
</Warning>

The [Git overview](/api-client/git/overview#messages-you-may-see) lists every message Requestly can show, with what each one means.

## Next steps

<CardGroup cols={2}>
  <Card title="Push and pull" icon="arrows-rotate" href="/api-client/git/push-and-pull">
    Fetch from the remote, read the ahead and behind counts, and sync your work.
  </Card>

  <Card title="Stash changes" icon="box-archive" href="/api-client/git/stashes">
    Park uncommitted work before a pull, and resolve a stash that applies with conflicts.
  </Card>

  <Card title="Stage and commit changes" icon="code-commit" href="/api-client/git/commit-changes">
    Read the change list, stage or discard files, and write a commit.
  </Card>

  <Card title="Browse history and diffs" icon="code-compare" href="/api-client/git/history-and-diffs">
    Read the commit graph, and open a read-only diff for a commit or a changed file.
  </Card>
</CardGroup>
