Bird
0
0

You ran git pull but got a merge conflict error. What should you do to fix this?

medium📝 Troubleshoot Q14 of 15
Git - Remote Repositories
You ran git pull but got a merge conflict error. What should you do to fix this?
AManually resolve conflicts in files, then commit the merge.
BDelete the repository and clone again.
CRun <code>git reset --hard</code> to discard local changes.
DRun <code>git fetch</code> again to fix conflicts.
Step-by-Step Solution
Solution:
  1. Step 1: Understand merge conflict after git pull

    git pull merges remote changes into your branch; conflicts happen if changes clash.
  2. Step 2: Resolve conflicts properly

    You must open conflicted files, fix conflicts manually, then stage and commit the merge to complete it.
  3. Final Answer:

    Manually resolve conflicts in files, then commit the merge. -> Option A
  4. Quick Check:

    Fix conflicts manually, then commit merge [OK]
Quick Trick: Resolve conflicts manually, then commit [OK]
Common Mistakes:
  • Rerunning fetch to fix conflicts
  • Resetting hard loses local work
  • Deleting repo is unnecessary

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes