Search⌘ K

How Does Conflict Exist?

Explore how merge conflicts arise in Git when different branches modify the same lines of code or files. Understand the causes of conflicts during branch merges and learn to recognize conflict errors that must be resolved to complete merges.

New Git learners often worry about conflicts. If we plan our branches carefully, the conflicts are usually not difficult to fix.

Merge different branches versus fast-forward

Conflict exists when we merge two branches that edit the same line of the source file or if a file is deleted in one branch but its contents are updated in another. Conflicts don’t happen when the merge is fast-forwarding. It may occur when the git ...