Challenge - 5 Problems
Three-way Merge Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Understanding the base in a three-way merge
In a three-way merge, what role does the 'base' commit play?
Attempts:
2 left
💡 Hint
Think about what helps Git compare changes from two branches.
✗ Incorrect
The base commit is the common ancestor of the two branches. Git uses it to compare changes made in each branch to detect conflicts and merge differences.
💻 Command Output
intermediate2:00remaining
Output of a three-way merge conflict
What output does Git produce when a three-way merge results in a conflict?
Git
git merge feature-branchAttempts:
2 left
💡 Hint
Look for messages indicating conflicts.
✗ Incorrect
When a merge conflict occurs, Git shows 'CONFLICT' messages and tells you to fix conflicts manually before committing.
🔀 Workflow
advanced3:00remaining
Steps to resolve a three-way merge conflict
Which sequence correctly describes the steps to resolve a three-way merge conflict in Git?
Attempts:
2 left
💡 Hint
Think about the logical order from detecting conflicts to finishing the merge.
✗ Incorrect
First, you check which files have conflicts, then edit them to fix conflicts, stage the fixed files, and finally commit the merge.
❓ Troubleshoot
advanced2:00remaining
Cause of repeated merge conflicts in a three-way merge
You keep getting the same merge conflicts every time you try to merge a feature branch into main. What is the most likely cause?
Attempts:
2 left
💡 Hint
Think about what happens if Git does not see your conflict resolutions.
✗ Incorrect
If you fix conflicts but do not stage the files with 'git add', Git thinks conflicts remain and will not complete the merge.
✅ Best Practice
expert2:30remaining
Best practice to minimize three-way merge conflicts
Which practice best helps reduce the chance of complex three-way merge conflicts in a team project?
Attempts:
2 left
💡 Hint
Think about keeping your branch up to date with others' changes.
✗ Incorrect
Regularly merging main into your feature branch keeps your work current and reduces conflicts when merging back.