Git AdvancedLesson 45Free preview
Git Merge Conflicts
This lesson is part of Git · All levels
Summary
Merge conflict occurs when two branches change the same row on one file so that Git cannot select an automated version. Conflict is marked with the blocks <<<<<< HEAD, =======, and >>>>>>> that you have to complete manually. Once the file is fixed and staged, continue merging or rebase with the follow-up command.
Key points
- Conflict arises when both branches change the same line
- The <<<<<< HEAD marker marks the active branch version
- Solve the conflict, save the file, then git add and continue to merge
- Git merge --abort cancels the merge that is running
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.