When changes collide.
WHAT A CONFLICT IS
The same region changed differently in two branches.
WHY IT IS NOT AN ERROR
It is the tool declining to guess which change is correct.
WHAT REDUCES THEM
Small changes Frequent integration Clear ownership of areas Consistent formatting, applied automatically
WHY FORMATTING
Inconsistent formatting causes conflicts in lines nobody meaningfully changed.
WHAT TO DO WHEN ONE OCCURS
Understand both changes before resolving Establish what each was trying to achieve Combine them correctly, which may be neither version
WHAT NOT TO DO
Accept one side without reading the other Resolve a conflict in code you do not understand
WHAT TO DO IN THAT CASE
Ask the other author.
WHAT TO ALWAYS DO AFTER RESOLVING
Build, and run the tests.
WHY
A resolution can be syntactically valid and behaviourally wrong.
WHAT TO USE
A merge tool showing both sides and the common ancestor.
WHY THE ANCESTOR
It shows what each side actually changed.