Yhdistämiskonfliktit syntyvät, kun Git ei voi automaattisesti yhdistää muutoksia (molemmat puolet muuttivat samoja rivejä). Niiden ratkaiseminen edellyttää konfliktien merkkien ymmärtämistä, oikean tuloksen päättämistä ja yhdistämisen saattamista loppuun. Kyky ratkaista ne luottavaisesti on tärkeä käytännöllinen taito.
Milloin ja miksi konfliktit syntyvät
Git auto-merges most changes, but a CONFLICT occurs when both branches changed the
SAME LINES (or one deleted what the other modified) — Git can't decide, so it asks YOU.
→ Conflicts are NORMAL in collaboration, not errors — just changes Git can't auto-resolve.
Konfliktien merkkien ymmärtäminen
<<<<<<< HEAD
code from YOUR current branch (the one you're merging INTO)
=======
code from the OTHER branch (the one being merged IN)
>>>>>>> feature-branch
