Skip to content

Commit 3fd08d8

Browse files
Copilottimrogerssaritai
authored
[2026-04-09] Ask Copilot cloud agent to resolve merge conflicts in 3 clicks (#60691)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com> Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com>
1 parent d44a00c commit 3fd08d8

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

content/copilot/how-tos/use-copilot-agents/cloud-agent/make-changes-to-an-existing-pr.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ If you prefer {% data variables.product.prodname_copilot_short %} to create a se
2626

2727
## Resolving merge conflicts
2828

29-
You can ask {% data variables.product.prodname_copilot_short %} to resolve merge conflicts on a pull request by mentioning `@copilot` and asking it to fix the conflicts using natural language, such as "@copilot resolve the merge conflicts on this PR."
29+
You can ask {% data variables.product.prodname_copilot_short %} to resolve merge conflicts on a pull request in two ways:
30+
31+
* **Using the "Fix with {% data variables.product.prodname_copilot_short %}" button**: If a pull request has merge conflicts, click the **Fix with {% data variables.product.prodname_copilot_short %}** button that appears in the merge box. This button is available if you have access to {% data variables.copilot.copilot_cloud_agent %} and it is enabled for the repository.
32+
* **Using an @copilot mention**: Mention `@copilot` in a comment on the pull request and ask it to fix the conflicts using natural language, such as "@copilot resolve the merge conflicts on this PR."
3033

3134
{% data variables.product.prodname_copilot_short %} will analyze the conflicting changes, resolve the conflicts, and ensure the build, tests, and linter still pass. Once it has finished, {% data variables.product.prodname_copilot_short %} will request your review so you can verify the conflict resolution before merging.
3235

content/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ To resolve a merge conflict, you must manually edit the conflicted file to selec
2424

2525
* If your merge conflict is caused by competing line changes, such as when people make different changes to the same line of the same file on different branches in your Git repository, you can resolve it on {% data variables.product.github %} using the conflict editor. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github).
2626
* For all other types of merge conflicts, you must resolve the merge conflict in a local clone of the repository and push the change to your branch on {% data variables.product.github %}. You can use the command line or a tool like [{% data variables.product.prodname_desktop %}](https://desktop.github.com/) to push the change. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line).
27+
{% ifversion copilot %}
28+
* For any type of merge conflict, if you have access to {% data variables.copilot.copilot_cloud_agent %} and it is enabled for the repository, you can click **Fix with {% data variables.product.prodname_copilot_short %}** in the merge box to have {% data variables.product.prodname_copilot_short %} resolve the conflicts for you. {% data variables.product.prodname_copilot_short %} will analyze the conflicting changes, resolve the conflicts, and verify that the build, tests, and linter still pass. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/make-changes-to-an-existing-pr#resolving-merge-conflicts).
29+
{% endif %}
2730

2831
If you have a merge conflict on the command line, you cannot push your local changes to {% data variables.product.github %} until you resolve the merge conflict locally on your computer. If you try merging branches on the command line that have a merge conflict, you'll get an error message. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line).
2932

content/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ category:
1717
---
1818
You can only resolve merge conflicts on {% data variables.product.github %} that are caused by competing line changes, such as when people make different changes to the same line of the same file on different branches in your Git repository. For all other types of merge conflicts, you must resolve the conflict locally on the command line. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line).
1919

20+
{% ifversion copilot %}
21+
22+
If you have access to {% data variables.copilot.copilot_cloud_agent %} and it is enabled for the repository, you can click **Fix with {% data variables.product.prodname_copilot_short %}** in the merge box to have {% data variables.product.prodname_copilot_short %} resolve the merge conflicts automatically. {% data variables.product.prodname_copilot_short %} will analyze the conflicting changes, resolve the conflicts, and verify that the build, tests, and linter still pass. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/make-changes-to-an-existing-pr#resolving-merge-conflicts).
23+
24+
{% endif %}
25+
2026
{% ifversion ghes %}
2127
If a site administrator disables the merge conflict editor for pull requests between repositories, you cannot use the conflict editor on {% data variables.product.prodname_ghe_server %} and must resolve merge conflicts on the command line. For example, if the merge conflict editor is disabled, you cannot use it on a pull request between a fork and upstream repository.
2228
{% endif %}

0 commit comments

Comments
 (0)