Merge conflicts terjadi ketika Git tidak dapat secara otomatis menggabungkan perubahan (kedua belah pihak memodifikasi baris yang sama). Mengatasi konflik melibatkan pemahaman tentang conflict markers, pengambilan keputusan hasil yang benar, dan penyelesaian merge. Melakukannya dengan percaya diri adalah keterampilan praktis yang penting.
Kapan dan mengapa konflik terjadi
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.
Memahami conflict markers
<<<<<<< HEAD
code from YOUR current branch (the one you're merging INTO)
=======
code from the OTHER branch (the one being merged IN)
>>>>>>> feature-branch
