تضاربات الدمج تحدث عندما لا يستطيع Git دمج التغييرات تلقائياً (كلا الجانبين قاما بتعديل نفس الأسطر). يتضمن حلها فهم علامات التضارب، اتخاذ القرار بالنتيجة الصحيحة، واستكمال الدمج. القيام بذلك بثقة هو مهارة عملية مهمة.
متى ولماذا تحدث التضاربات
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.
فهم علامات التضارب
<<<<<<< HEAD
code from YOUR current branch (the one you're merging INTO)
=======
code from the OTHER branch (the one being merged IN)
>>>>>>> feature-branch
