Resolve merge conflicts
A conflict happens when both branches of a pull request changed the same part of a file in different ways. Luzbase can’t know which change you want, so it asks you to choose. Changes to different parts of a file are combined automatically and don’t need your help.
Open the conflicts
Section titled “Open the conflicts”- Open the pull request.
- In the merge box, find “N files have conflicts” and click Resolve conflicts.
The resolve page lists the Conflicting files on the left, each marked unresolved, with how many conflicts are left, or resolved. Click a file to work on it.
Resolve a conflict in a text file
Section titled “Resolve a conflict in a text file”For each conflict, Luzbase shows the text from both branches side by side. In the examples below, the pull request merges draft into main. Choose one of:
| Button | Result |
|---|---|
| Keep main | Keep the text from the branch you are merging into. |
| Use draft | Use the text from the branch you are merging. |
| Keep both (main first) | Keep both, with the main text first. |
| Keep both (draft first) | Keep both, with the draft text first. |
| Edit | Write the text yourself. |
To apply the same choice to every conflict in the file, use Keep main for all or Use draft for all. Click Show original to see the text as it was before either branch changed it.
Edit the whole result
Section titled “Edit the whole result”- Click Edit result to see and edit the merged file.
- Make your changes. Remove every conflict marker (
<<<<<<<,=======,>>>>>>>) that is left. - Click Mark resolved.
If markers are still in the text, Luzbase says so and doesn’t mark the file as resolved.
Keyboard shortcuts
Section titled “Keyboard shortcuts”| Keys | Action |
|---|---|
| n / p | Next or previous conflict |
| Alt+1 | Keep the target branch’s text (for example Keep main) |
| Alt+2 | Use the source branch’s text (for example Use draft) |
Press a shortcut twice to change a conflict you already resolved.
Resolve a conflict in an image or other file
Section titled “Resolve a conflict in an image or other file”Images, PDFs and other binary files can’t be combined line by line. Click Keep this version under the side you want.
If one branch deleted a file that the other changed, choose Delete file, or keep the file with its changes (for example Keep draft’s changes).
When every file is resolved:
- Click Merge.
- You see “Merged into main.” Luzbase opens the pull request again.
Merging still needs the required approvals and, if the target branch has unsaved changes, your confirmation that they will be replaced. See Pull requests.