Git Course 0%

Merge Conflicts

A conflict is Git telling you it found two answers to the same question and will not guess. It is not a failure, not damage, and not a sign that anything is broken: your work is intact, the other person's work is intact, and Git is waiting for a decision. This section removes the fear, then makes the mechanics routine: read the markers, decide, mark it resolved, finish the merge. Every step has an escape hatch that puts everything back.

Before you start: Section 6 for merging and rebasing, and Section 7 for pulling. It helps to have run Lab 3, though the exercises here create their own conflicts.

Lessons in this section

  1. Why conflicts happenIntermediate≈ 9 min
  2. Reading conflict markersIntermediate≈ 9 min
  3. Resolve in the terminal; continue or abortIntermediate≈ 12 min
  4. Resolve in VS Code, IntelliJ, GitLab, GitHubIntermediate≈ 15 min
  5. Rebase conflictsIntermediate≈ 9 min
  6. Avoiding conflictsIntermediate≈ 6 min
  7. Interactive: the conflict resolverIntermediate≈ 10 min