LearnViz CompSci
Home / Learn / DevOps & Tooling / Resolving Merge Conflicts

Beginner Topic 10 of 50 DevOps & Tooling

Resolving Merge Conflicts

Reconciling overlapping edits.

How it works

A conflict occurs when two branches change the same lines, or one deletes a file the other edits, so Git cannot decide automatically. Git stops, marks the file with conflict markers (<<<<<<<, =======, >>>>>>>) separating each side, and lists the file under unmerged paths in git status. You edit the file to the correct final content, remove the markers, git add the file and finish with git commit, git merge --continue or git rebase --continue. git merge --abort returns to the earlier state, and merge tools show three panes with ours, theirs and the common base.

Where it is used

Anyone working in a team resolves conflicts when updating a branch, rebasing onto main or cherry-picking a fix to a release line.

Common pitfall

Blindly accepting one side loses someone else's work, and leaving markers in the code breaks the build. Understand both changes, talk to the author when unsure, and run tests after resolving.

Where it fits in the course

Resolving Merge Conflicts is topic 10 of 50 in DevOps & Tooling, rated Beginner. It follows Pull Requests. The next topic is Git Internals.

Practice and explore

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the DevOps & Tooling quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is Resolving Merge Conflicts?
Reconciling overlapping edits. It belongs to DevOps & Tooling and is a beginner-level topic.
Where do people use Resolving Merge Conflicts?
Anyone working in a team resolves conflicts when updating a branch, rebasing onto main or cherry-picking a fix to a release line.
What is the most common mistake with Resolving Merge Conflicts?
Blindly accepting one side loses someone else's work, and leaving markers in the code breaks the build.
What should I learn before this topic?
Start with Pull Requests, the topic just before it in DevOps & Tooling.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the DevOps & Tooling quiz.
Is Resolving Merge Conflicts hard to learn?
It is a Beginner topic, so it works as an entry point. If the terms are new, read the explanation twice and try the visualizer before the quiz.
How long does it take to learn Resolving Merge Conflicts?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Resolving Merge Conflicts?
Pull Requests, Git Internals, Branching and Merging are closely connected. The full list is in the related topics section of this page.
What should I study after Resolving Merge Conflicts?
Continue with Git Internals, the next topic in DevOps & Tooling.

Related topics