What you already know
Retrieval · lessons 04 and 05Two from memory. The second one is the whole reason this lesson exists.
When does git report a conflict rather than merging automatically?
During a merge, which side do the ours markers hold?
There is more than one kind
Claim + proof · git status --shortAlmost everything written about git conflicts describes exactly one case: two sides edited the same lines, and markers appear in the file. That case is common, and it is the easy one.
Here is a merge that produces three different kinds at once.
$ git merge feature Auto-merging config.yml CONFLICT (content): Merge conflict in config.yml CONFLICT (modify/delete): legacy.txt deleted in feature and modified in HEAD. Version HEAD of legacy.txt left in tree. Auto-merging retry.ts CONFLICT (add/add): Merge conflict in retry.ts Automatic merge failed; fix conflicts and then commit the result.
Read the parenthesised words. content, modify/delete, add/add — three names, and git tells you which is which before you open a single file.
And git status --short gives you the same three facts in three characters each. The two-letter codes are the index state for each side: the first letter is ours, the second is theirs (git-status).
$ git status --short UU config.yml UD legacy.txt AA retry.ts
UU — both modified. UD — we modified, they deleted. AA — both added. A U on either side means unmerged, and the letters say what each side did.
A conflict is not “markers appeared in a file”. It is a path git refused to resolve. Two of the three above have no markers to read: legacy.txt is sitting in your working tree looking perfectly normal, and it is unmerged.
You resolve config.yml and retry.ts, both of which had markers. You do not touch legacy.txt, because it looks fine. You run git commit. What happens?
git status --short. Every unmerged path, with its kind encoded in two letters. Do this before opening an editor — the file that needs the most thought is often the one that looks untouched.
The index holds three copies
You have read the first 2 steps in full — a claim and the verification that settles it. The rest of this lesson, and the 9 lessons after it, open when subscriptions do. Nothing that is free today will be taken away then.