Mid
From PDF
Version Control
Git & GitHub
How would you handle diverged branches with conflicting changes?
Short answer: When branches diverge, Git can’t automatically merge them — it needs your help. Steps: Pull the latest changes and rebase or merge: git fetch origin git merge origin/main or git rebase origin/main
Real-world example (ShopNest)
Feature work for “UPI payment” lives on feature/upi-payment. Open a PR to main; resolve conflicts before merge.
Say this in the interview
- Define — one clear sentence (the short answer above).
- Example — relate it to a project like ShopNest or your real work.
- Trade-off — when you would not use it.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png