Introduction
When multiple people change the same file in different ways, Git uses a three-way merge to combine those changes. It compares the common starting point and the two changed versions to create a final merged file.
When two developers edit the same file on different branches and you want to combine their work.
When you pull changes from a remote repository that conflict with your local changes.
When you want to merge a feature branch back into the main branch after independent work.
When resolving conflicts after rebasing your branch onto another branch.
When Git cannot automatically merge changes and asks you to fix conflicts manually.