What is the three-way merge algorithm used by Git and how does it resolve conflicts?

Git Hard

Git — Hard

What is the three-way merge algorithm used by Git and how does it resolve conflicts?

Key points

  • The algorithm relies on a common ancestor for comparison
  • Branch tips are evaluated against this ancestor
  • Changes are merged or marked as conflicts based on this comparison
  • The process prioritizes accuracy over simplicity

Ready to go further?

Related questions