Create competing changes
To understand conflicts, create two branches from the same commit and change the same lines differently. Merge one branch into the other and inspect the conflict rather than immediately choosing a side.
Resolve by understanding intent
Read both versions and decide what the final program should do. Remove the conflict markers, run the relevant tests and stage the resolved file. The merge commit should contain a valid, tested result.
Verify the final history
After resolving, inspect the graph and diff. A successful merge command only means Git accepted the resulting file content; application-level correctness still requires tests.