DevOps Interview DropBeginner TierScenario+10 XP on read
Your branch is 5 commits behind main and you have uncommitted changes. How do you update safely?
Core Summary
Save the uncommitted work first with a stash or a WIP commit, then fetch and rebase onto origin/main, then bring it back. The real point is knowing what git pull would do to your branch before you run it.
Hints
Hint 1: Uncommitted work is the only thing Git cannot recover for you
Hint 2: fetch first, then choose rebase or merge
Hint 3: A WIP commit is safer than a stash you might forget
Reported in interviews at Shopify