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
- Open the interactive lesson, with a mini quiz.
- Take the DevOps & Tooling quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- 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?
Where do people use Resolving Merge Conflicts?
What is the most common mistake with Resolving Merge Conflicts?
What should I learn before this topic?
How can I practice it?
Is Resolving Merge Conflicts hard to learn?
How long does it take to learn Resolving Merge Conflicts?
Which topics are related to Resolving Merge Conflicts?
What should I study after Resolving Merge Conflicts?
Related topics
- Pull Requests (DevOps & Tooling)
- Git Internals (DevOps & Tooling)
- Branching and Merging (DevOps & Tooling)
- Shell Scripting (DevOps & Tooling)
- Merge Sort (Algorithms)