Merge conflicts اس وقت پیش آتے ہیں جب Git تبدیلیوں کو خودکار طریقے سے یکجا نہیں کر سکتا (دونوں اطراف نے ایک ہی lines میں ترمیم کی ہو)۔ انہیں حل کرنے میں conflict markers کو سمجھنا، درست نتیجے کا فیصلہ کرنا، اور merge مکمل کرنا شامل ہے۔ اسے اعتماد کے ساتھ کرنا ایک اہم عملی مہارت ہے۔
Conflicts کب اور کیوں ہوتے ہیں
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.
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
