Mid
From PDF
Version Control
Git & GitHub
Merge or push this branch back to restore the lost history.?
Short answer: Example: If your teammate accidentally ran git push origin main --force, you can still restore your lost commits using your local reflog if you had pulled the branch before the overwrite.
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