You can resolve simple competing line change conflicts on GitHub. For other conflicts, use the command line. See Resolving a merge conflict using the command line.
If Copilot云代理 is enabled for the repository, you can click Fix with Copilot in the merge box to have Copilot resolve conflicts automatically. See 在 GitHub 上使用 Copilot 云代理.
警告
Resolving conflicts on GitHub merges the entire base branch into the head branch. If the head branch is the default or protected branch, you may be prompted to create a new head branch. See 关于受保护分支.
-
在仓库名称下,单击 “Pull requests”****。

-
In the "Pull Requests" list, click the pull request with a merge conflict that you want to resolve.
-
Near the bottom of your pull request, click Resolve conflicts.

注意
If Resolve conflicts is deactivated, resolve the conflict using another Git client or the command line. See Resolving a merge conflict using the command line.
-
决定您是否想只保持分支的更改、只保持其他分支的更改,还是进行全新的更改(可能包含两个分支的更改)。 删除冲突标记
<<<<<<<、=======、>>>>>>>,并在最终合并中进行所需的更改。 -
If your file has more than one merge conflict, scroll down to the next set of conflict markers and repeat steps four and five to resolve the conflict.
-
After you've resolved all the conflicts in the file, click Mark as resolved.

-
If more than one file has a conflict, select the next file you want to edit on the left side of the page under "conflicting files" and repeat steps four through seven until you've resolved all merge conflicts in your pull request.
-
After you've resolved all your merge conflicts, click Commit merge. This merges the entire base branch into your head branch.

-
If prompted, review the branch that you are committing to. You can update the head branch or, if available, create a new branch for the pull request. If the head branch is protected, you must create a new branch.
Click Create branch and update my pull request or I understand, continue updating BRANCH.
-
To merge your pull request, click Merge pull request. See 合并拉取请求.