How to resolve a merge conflict in your paper
Two co-authors rewrote the same sentence. Here's how to read a conflict, pick the right version (or keep both), and merge in under a minute.

Most merges in Luzbase need nothing from you. If your co-author edited the results section on a branch while you edited the introduction on main, the two sets of changes combine on their own.
A conflict happens only in one situation: two people changed the same lines in different ways, and Luzbase can't know which version you want. That's a decision for a person, so it asks you.
This guide walks through one.
The example
You and Amira are writing a paper. On main, you tightened the abstract's first sentence:
We present a method that halves training time on standard benchmarks.Meanwhile, on her branch abstract-rewrite, Amira rewrote the same sentence:
We introduce a training method that cuts wall-clock time by 48\% on ImageNet.She opens a pull request into main. The merge box says Merging is blocked because of a conflict.
1. Open the conflict view
Click Resolve conflicts on the pull request. You'll see a list of Conflicting files. Choose main.tex.
Each conflict shows both versions side by side, with the changed words highlighted, so you can see exactly where they differ. You can also open the Original (before either change) to see what the sentence said before either of you touched it. That's often the quickest way to understand what each person was trying to do.
2. Choose, for each conflict
For every conflict you have four options:
- Keep main: your version wins.
- Use abstract-rewrite: Amira's version wins.
- Keep both (main first) or Keep both (abstract-rewrite first): both versions go in, one after the other. Useful when two people each added a different sentence in the same spot.
Keyboard users can press Alt+1 to keep main and Alt+2 to use the branch, and jump between conflicts with n and p.
In our example, neither version is quite right. Amira's has the concrete number, yours is shorter. So:
3. Edit by hand when neither is right
Click Edit the merged result by hand and write the sentence you actually want:
We present a training method that cuts wall-clock time by 48\% on ImageNet.Then click Mark resolved. Luzbase checks that no conflict markers are left behind before it accepts the result.
4. Whole-file shortcuts
If one side should win everywhere in a file (say, Amira rewrote appendix.tex and you only fixed a typo there), skip the one-by-one work: Keep main for all or Use abstract-rewrite for all settles every conflict in that file at once.
Some conflicts aren't about text at all. If one person edited a figure and the other deleted it, you'll get a clear choice between Keep this version and Delete file.
5. Merge
Once every file is resolved, the merge box changes to Ready to merge. Click Merge, and the combined paper lands on main.
How to have fewer conflicts
Conflicts aren't a sign that anything went wrong. They're the system doing its job. But you can make them rarer:
- One file per section. Split a long paper with
\input{sections/intro}and friends. Two people rarely edit the same file at the same time. - One sentence per line. LaTeX ignores single line breaks, so writing one sentence per line costs nothing in the PDF. It means a conflict covers one sentence, not a whole paragraph.
- Merge often. A branch that lives for two days has fewer surprises than one that lives for two months.
Start writing free and try a branch on your next paper.



