Merge çakışmaları, Git otomatik olarak değişiklikleri birleştiremediğinde oluşur (her iki taraf da aynı satırları değiştirdi). Bunları çözmek, çakışma işaretçilerini anlamak, doğru sonuca karar vermek ve merge işlemini tamamlamak içerir. Bunu güvenle yapabilmek önemli bir pratik beceridir.
Çakışmaların ne zaman ve neden oluştuğu
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.
Çakışma işaretçilerini anlamak
<<<<<<< HEAD
code from YOUR current branch (the one you're merging INTO)
=======
code from the OTHER branch (the one being merged IN)
>>>>>>> feature-branch
